Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Typedesigner in OMEdit?

Typedesigner in OMEdit?

Hello,

i was working with SimulationX and Modelica for a long time and now we are recently trying to switch to OMedit. In SimulationX you could use a Typedesigner to create custimized Libary elements. Is this also possible in OMedit and how? How can I specify a connetor in OMedit? Can somebody give me an example for a translational spring? I am not looking for the equation. I am looking for the connector-settings. Translational can only be connected to translational elements and so on. Does somebody has a tutorial?

Best regards,

pheinze

Re: Typedesigner in OMEdit?

Hi,

Create a new connector via File->New Modelica Class, give it some name and choose the connector from the restriction drop down.
Draw icon for the connector in the icon view and type in the required equations in the Modelica text view.

Adeel.

Re: Typedesigner in OMEdit?

Hello Adeel,

Thank you for your reply. I clicked on File>New>Connector. I can give it some name but I don't not find any option in the drop down menu - it's simply blank. Am I doing it wrong or is there some settings or additional programm installation necessary. Could you send me some screenshoots on my email address? (ph.heinze@web.de)

Best regards

Re: Typedesigner in OMEdit?

Check email.

Adeel.

Re: Typedesigner in OMEdit?

Hello, I am using typedesigner of Simulationx to develop roller bearing dynamics.I met with some problems with all equations typed in.

if possible, I expect you can spare some time to check it.

thx
shao

Re: Typedesigner in OMEdit?

Can you describe the problems?

Adeel.

Re: Typedesigner in OMEdit?

Thanks very much for your response.

to see the movements of bearing elements clearly and to mix the cage flexibility of cage into analysis on bearing dynamics, I use SimulationX to perform the work before using Openmodelica.


I am using simulationx typedesigner to develop the force element between each element of bearing, Even I checked the equations of bearing interactions lots of times, I still find that always error occurs in the model.

I would like to attach the equations programmed here to describle the interaction bearing inner race and tapered roller,(now firstly assume that it is a cylinder bearing with contact angle 0, const roller diameter and const inner ring diameter), which are based on Gupta work.


in the typedesigner, the behavior is written :

// enter your equations here
//transformation from Inner ring CS to WCS
Tir=ctr1.R;
//transformation from Roller CS to WCS
Tib=ctr2.R;
//transformation from Azimuth CS to Contact CS
alfa=0;
Tac=[1,0,0;0,cos(alfa),-sin(alfa);0,sin(alfa),cos(alfa)];//

//other variants of CS transformation
Tbr*Tib=Tir;
Tib*Tbi=identity(3);//identity(3)=[1,0,0;0,1,0;0,0,1];

//vectors under different CSs 
Rbr_r=Tir*(ctr2.x-ctr1.x);

//material parameters
E=2.06*e^11;
v=0.3;
kn=0.39*(4*(1-v^2)/E+4*(1-v^2)/E)^0.9;
L=48;//roller length: using a same roller contact length to calculate even under tilting motions

//load initialization
Fr={0,0,0};
Fb={0,0,0};
Mb={0,0,0};
Mr={0,0,0};

// slice Method: 7 slices of one roller
for n in 1:7 loop

z=L/7*(n-(7+1)/2);

//firstly, get slice center in Ring CS:Rsr_r
Rsr_r=Rbr_r+Tbr*{0,0,z};//slice center
tan(azimuthphis)=-Rsr_r[1]/Rsr_r[2];//=slice azimuth
Tra=[cos(azimuthphis),-sin(azimuthphis),0;sin(azimuthphis),cos(azimuthphis),0;0,0,1];//z:transform from Inner race CS to azimuth CS

//secondly, find P point in Roller CS,Ring CS,Azimuth CS
Rsn=25;// roller diameter
Rpb_b={-Rsn*sin(phipb),Rsn*cos(phipb),z};

Rpr_r=Tbr*Rpb_b+Rbr_r;
Rpr_a=Tra*Rpr_r;
Rpr_a[1]=0;//using 0 x-value under Azimuth CS to locate P's azimuth phipb w.r.t slice center

//thirdly, get slice deformation and slice load under Contact CS
Rrn=80;// inner ring diameter
defp=(-Rpr_a[2]+Rrn)*cos(alfa);//direct deformation calculation:defp
if defp>0 then
defp/1000=kn*qs^0.9/(L/1000)*0.8;//slice load calculation using Palmgren formula:qs
else
qs=0;
end if;

//forthly Tac, traction force calculation:capture P velocities(in both inner race and roller)under Contact CS

kt=0.05; // using const friction coefficient temporarily

//fifthly, traction force calculation: P force from Contact CS to WCS
Fcs={-kt*qs,qs,0};
Tac*Fas=Fcs;
Tra*Frs=Fas;
Tbr*Fbs=Frs;
Mbs=cross(Rpb_b,Fbs);
Mrs=cross(Rpr_r,Frs);//fake
Fr=Fr+Frs;
Fb=Fb+Fbs;
Mb=Mb+Mbs;
Mr=Mr+Mrs;
end for;


ctr1.F=Fr;
ctr1.T=Mr;
ctr2.F=Fb;
ctr2.T=Mb;



thx a lot for your time
shao

Re: Typedesigner in OMEdit?

sorry , I also try to submit some pic here. but failed.

and I know it may be hard for other engineers to read the idea of bearing since I have spent too much on it for many years.
but modelica language will make it  be easily accepted by others.

so the main problems may be:
I misused some syntax.


shao

506379989@qq.com

There are 0 guests and 0 other users also viewing this topic