Gravity is not constant in my case
Hi,
I am trying to simulate a reservoir under variable acceleration (sloshing case). It is well known that it is equivalent to a variable gravity. However in star-ccm++ I do not find how to made the gravity variable (user function). Any idea? Regards |
Re: Gravity is not constant in my case
Hi,
Your best bet here is a java macro to update the value of gravity before each timestep. To do this, record a macro of you setting the gravity and then taking a timestep. Afterwards open the .java file and wrap the commands in some sort of java for or do loop and then modify the gravity function as required. Regards Steve |
Re: Gravity is not constant in my case
Hi
Thank you it work like a charm :) I need to track the altitude of the free surface, any means simpler then adding all the volume against the vertical and dividing by the length? waterheight=sum(vof(x=cst,y=cst,z))/(length*volumebase) Regards Bastien |
Re: Gravity is not constant in my case
Hi Bastien,
What about a field function ($VolumeFraction0>0.5)?$$Centroid[2]:-1e12 Then create a maximum report of this field function for where ever you are interested (plane section, fluid domain etc.). Is this perhaps what you are after? Steve |
Re: Gravity is not constant in my case
It works thank you.
Bastien |
Re: Gravity is not constant in my case
Hi,
Can you send me the macro for the variable gravity case? I am also working on a similar case. |
All times are GMT -4. The time now is 05:55. |