CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

Gravity is not constant in my case

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2009, 08:48
Default Gravity is not constant in my case
  #1
bastien
Guest
 
Posts: n/a
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
  Reply With Quote

Old   January 6, 2009, 11:53
Default Re: Gravity is not constant in my case
  #2
steve
Guest
 
Posts: n/a
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

  Reply With Quote

Old   January 6, 2009, 15:11
Default Re: Gravity is not constant in my case
  #3
bastien
Guest
 
Posts: n/a
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
  Reply With Quote

Old   January 6, 2009, 17:18
Default Re: Gravity is not constant in my case
  #4
steve
Guest
 
Posts: n/a
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

  Reply With Quote

Old   January 7, 2009, 13:39
Default Re: Gravity is not constant in my case
  #5
bastien
Guest
 
Posts: n/a
It works thank you.

Bastien
  Reply With Quote

Old   January 23, 2009, 00:41
Default Re: Gravity is not constant in my case
  #6
mahi
Guest
 
Posts: n/a
Hi,

Can you send me the macro for the variable gravity case? I am also working on a similar case.
  Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to consider gravity in CFX shrimp CFX 4 September 8, 2008 21:41
Cloning a case or creating a new case for 16 processes mellanoxuser OpenFOAM Running, Solving & CFD 0 February 8, 2008 17:52
Problem seeing new case in case browser alan_fergus OpenFOAM Pre-Processing 9 June 22, 2006 04:46
gravity-table.scm scheme file for trans gravity Shankar FLUENT 0 May 31, 2006 05:30
Gravity in CFX Tuks Main CFD Forum 0 September 20, 2005 02:13


All times are GMT -4. The time now is 06:35.