Using Transient Boundary Conditions in OpenFOAM

Sometimes, implementing time varying boundary conditions for a transient simulation is interesting. A series of pressure (or other varibles) values should be read from a text file, and update the boundary at each timestep.

the boundary value type should be set as timeVaryingUniformFixedValue, and timeDataFileName should be set with the filename. for example:

type timeVaryingUniformFixedValue; 
timeDataFileName "inlet.dat"; 
value uniform 1e5; 

However, the data file should be in the following format, if the boundary is set as pressure, a scalor variable:

t0 p0 
t1 p1 
t2 p2 
tN pN 

If the boundary is set as a vector variable, the data file should be

t0 (v1 v2 v3) 
t1 (v1 v2 v3) 
t2 (v1 v2 v3) 
tN (v1 v2 v3) 

P.S. Thanks the post on OpenFOAM Message Board. I correct it. I apologize for this faulty information.

The right method: If the variable is vector, it should be set as magnitude. the system will determine the patch normal and apply this magnitude along the normal.

(The information is from OpenFOAM Message Board)

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.