CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   How to specify BC as a function compiled in solver (

kar January 29, 2008 10:50

Hello, Recently I've been "

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
The parabolic-inlet is not time-dependent. He will need a "real" boundary condition.

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 16:43.