Initial Conditions on body not working
Hey all,
I'm trying to introduce some initial conditions to a model (rotational velocity about 1 axis) but everytime I run it they don't seem to have been introduced at all.
I have a model with two bodies (6DoF) which initially start out joined via a bushing. Using a template I simulate some initial time, deactivate the busing, then simulate some more to see the behavior of the two bodies after the release of the busing. This main template writes to the solver command file. There is another template which sets up some proximity sensors which writes to the solver input deck.
So far I have tried: introducing a angular velocity IC on one body, on multiple bodies, shifting the initial condition reference frame to be at the center of mass of the connected system and trying again with one then multiple bodies. I have also tried setting the IC's directly in the model.
I'm checking they have worked by plotting the WM of one of the bodies relative to the ground body. In all the above cases WM returns 0 at T=0, and for the next few steps regardless of the value of any of the ICs.
I'm not sure if there's something obvious i could be missing here, or perhaps if the templates are somehow overriding the the ICs.
Any advice/guidance or tips would be really helpful and really appreciate.
thanks,
Andreas
Answers
-
Hi Andreas,
How do you have the WM output setup? For example is it using the CM marker idstring or the body idstring? `WM({b_0.cm.idstring})`.
Best,
Christopher Fadanelli
Application Engineer : Multibody Dynamics
1 -
Hi Andreas,
How do you have the WM output setup? For example is it using the CM marker idstring or the body idstring? `WM({b_0.cm.idstring})`.
Best,
Christopher Fadanelli
Application Engineer : Multibody Dynamics
Hey Christopher,
Thanks for the quick response! I set it up as you would through the MotionView GUI selecting a velocity output for a entity with the body as the entity and the global reference frame as the marker.
Looking through the xml from the run the "post_request" does call back to the "body-marker CM" id. Not sure if this is what you meant?
Best,
Andreas0 -
Andreas_21886 said:
Hey Christopher,
Thanks for the quick response! I set it up as you would through the MotionView GUI selecting a velocity output for a entity with the body as the entity and the global reference frame as the marker.
Looking through the xml from the run the "post_request" does call back to the "body-marker CM" id. Not sure if this is what you meant?
Best,
AndreasHi Andreas,
There are a couple ways to setup the output. One is through the way you mentioned with the Guide Bar and the other is to use expressions (which I was referring to). Both methods use the body CM marker. When you run the model are there any errors/redundant constraints appearing in the log file? If possible, can you share the model (File-> Export -> Model -> Archive Model/ Zip).
Best,
Christopher
1 -
Hi Andreas,
There are a couple ways to setup the output. One is through the way you mentioned with the Guide Bar and the other is to use expressions (which I was referring to). Both methods use the body CM marker. When you run the model are there any errors/redundant constraints appearing in the log file? If possible, can you share the model (File-> Export -> Model -> Archive Model/ Zip).
Best,
Christopher
Hi Christopher,
Sorry for the delay. Looking at my log file there aren't any errors its flagging up, the only info that would be cause for concern i think is the specified hmax being larger than the print interval, but this is resolved before the first dynamic analysis is run.
There aren't any constraints on the two bodies at would restrict their degrees of freedom, there is for other bodies but these are constrained to the two bodies respectively and none are ground.
Unfortunately I cant share the model, but let me know if there's any other troubleshooting you think might help and I can try it.
Best,
Andreas0 -
Andreas_21886 said:
Hi Christopher,
Sorry for the delay. Looking at my log file there aren't any errors its flagging up, the only info that would be cause for concern i think is the specified hmax being larger than the print interval, but this is resolved before the first dynamic analysis is run.
There aren't any constraints on the two bodies at would restrict their degrees of freedom, there is for other bodies but these are constrained to the two bodies respectively and none are ground.
Unfortunately I cant share the model, but let me know if there's any other troubleshooting you think might help and I can try it.
Best,
AndreasAndreas,
Are the bodies flexbodies or completely rigid?
Can you try this, create a new marker. Associate it to the respected body and origin. Create an expression output retrieving the WM of that markers idstring(`WM({m_0.idstring})`)? I want to make sure if that works or not.
Best,
Christopher
1 -
Andreas,
Are the bodies flexbodies or completely rigid?
Can you try this, create a new marker. Associate it to the respected body and origin. Create an expression output retrieving the WM of that markers idstring(`WM({m_0.idstring})`)? I want to make sure if that works or not.
Best,
Christopher
Bodies are only rigid with rigid groups and no Compliance. The bushings have a given stiffness and are compliant.
Is the origin you want me to target the body cm or the global?
Cheers,
Andreas0 -
Andreas_21886 said:
Bodies are only rigid with rigid groups and no Compliance. The bushings have a given stiffness and are compliant.
Is the origin you want me to target the body cm or the global?
Cheers,
AndreasFor the origin, use the cm point.
Best,
Christopher
1 -
For the origin, use the cm point.
Best,
Christopher
Hi Christopher
I've set this up as instructed, the expression is pulling in the correct ID string. I added a initial condition to the model, at model level (i.e. overwriting all others). The output returned a flat 0 for all points in time.
Best,
Andreas0 -
Andreas_21886 said:
Hi Christopher
I've set this up as instructed, the expression is pulling in the correct ID string. I added a initial condition to the model, at model level (i.e. overwriting all others). The output returned a flat 0 for all points in time.
Best,
AndreasOk so i built a quick model simpler model to troubleshoot the problem. What I found is if I set initial conditions at model level they don't apply, but if I set them for each body they do.
This however still isn't working for my original model. So I'm trying to figure out exactly what a initial condition specifies and how.
Does the marker for a rotational initial condition specify the center of rotation?
0 -
Andreas_21886 said:
Ok so i built a quick model simpler model to troubleshoot the problem. What I found is if I set initial conditions at model level they don't apply, but if I set them for each body they do.
This however still isn't working for my original model. So I'm trying to figure out exactly what a initial condition specifies and how.
Does the marker for a rotational initial condition specify the center of rotation?
Hi Andreas,
I tried on a example model too where I applied an IC at the model level and at the body level. The body level worked and the Model level didn't. That is a bug, I will raise a ticket to the developers. Thank you for pointing that out.
For your question regarding "Does the marker for a rotational initial condition specify the center of rotation?". If the option in the Entity Editor "User_defined WM" is enabled then that will specify the direction. If it is not selected, it will be set to the CM marker/origin of the body.
Best,
Christopher
1 -
Hi Andreas,
I tried on a example model too where I applied an IC at the model level and at the body level. The body level worked and the Model level didn't. That is a bug, I will raise a ticket to the developers. Thank you for pointing that out.
For your question regarding "Does the marker for a rotational initial condition specify the center of rotation?". If the option in the Entity Editor "User_defined WM" is enabled then that will specify the direction. If it is not selected, it will be set to the CM marker/origin of the body.
Best,
Christopher
Hi Christopher,
No worries happy to have helped out abit.
So the thinking behind that question was perhaps setting the IC on each body has them competing against each other. If I wanted to simulate setting a global IC, then I can move the User_defined WM marker to a location equivalent to the CG of the combined bodies and apply the rotations from there. unfortunately that doesn't work for me but maybe its a temporary workaround to the bug?
best,
Andreas0 -
Andreas_21886 said:
Hi Christopher,
No worries happy to have helped out abit.
So the thinking behind that question was perhaps setting the IC on each body has them competing against each other. If I wanted to simulate setting a global IC, then I can move the User_defined WM marker to a location equivalent to the CG of the combined bodies and apply the rotations from there. unfortunately that doesn't work for me but maybe its a temporary workaround to the bug?
best,
AndreasYes Andreas that would be a temporary workaround for the bug.
1 -
Another workaround is to use the msolve api.
What needs to be done.
Export the model as a solver deck -> Export as a .py file.
Open the python script in any notepad editor.
Scroll all the way down until model = createTheModel()
Insert a new line.
Append this code:
"part_list = [part for part in model.getChildren(type=Part) if not part.ground]
for part in part_list:
part.wm = model.Marker_30101010
part.wx = 0
part.wy = 0
part.wz = 50"
A list is being created of all the parts except ground (you can specify other parts to not be included).
A for loop goes through each part and updates the IC conditions.
Marker_30101010 is the ground but you can specify any marker.
To grab the specified marker. Find the instance when the marker is made and update that line like so.
Original line: Marker(id=30101010, label="Global Frame", body=30101)
Updated line: Model_0.Marker_30101010 = Marker_30101010 = Marker(id=30101010, label="Global Frame", body=30101)
To run the .py file. Open up the compute console, input the file and run.To learn more about the api. Please visit https://2023.help.altair.com/2023.1/hwsolvers/motionapi/getting_started.html
Best,
Christopher Fadanelli
1