CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

if statement in g-file

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By Bloerb

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 29, 2018, 03:54
Default if statement in g-file
  #1
New Member
 
Bernhard
Join Date: Jun 2018
Posts: 15
Rep Power: 7
hebe03364 is on a distinguished road
Hello!

I would like to set the gravitation g in my simulation in the first 0.5 seconds to (0,0,0). Aftwerwards it should switch to (0,0,9.81). I tried it by the us of an if-statement in my g-file with

Code:
if(runTime<0.5)
{
value (0 0 0);
}
else
{
value (0 0 9.81);
}
but it doesn't work. Can anybody help me with this issue? Thanks in advance!
hebe03364 is offline   Reply With Quote

 


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 calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 08:46
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


All times are GMT -4. The time now is 03:18.