CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to specify BC as a function compiled in solver (http://www.cfd-online.com/Forums/openfoam-solving/59188-how-specify-bc-function-compiled-solver.html)

kar January 29, 2008 10:50

Hello, Recently I've been "
 
Hello,

Recently I've been "playing" with OF quite a lot, but haven't found how to do that thing. For example I would like to write some time dependant, nonlinear C++ function for temperature on boundary. Let x,y be local coordinates on boundary surface, t - time, so I want to use BC T = T(x,y,t). Or T gradient. If local coordinates is a problem, I don't mind writing that function for global ones.
How to do this?

unoder January 29, 2008 16:36

Search for parabolic inlet...
 
Search for parabolic inlet... I remember a discussion about that earlier.

gschaider January 29, 2008 17:30

@martin: The parabolic-inlet
 
@martin:
The parabolic-inlet is not time-dependent. He will need a "real" boundary condition.

@karlis:
Have a look at $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived/timeVaryingUniformFixedValue / as a starting point (the parabolic stuff might give you an idea how to implement the spatial part of the function)


All times are GMT -4. The time now is 13:44.