CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Creating new boundary condition (http://www.cfd-online.com/Forums/openfoam/60943-creating-new-boundary-condition.html)

billy December 16, 2006 11:30

Hi, Can anyone tell me what
 
Hi,

Can anyone tell me what are the major steps to implement a new boundary condition?

Thanks,

Billy.

hemph December 18, 2006 12:34

Hi Billy, If your new fiel
 
Hi Billy,

If your new field is based on a fixedValueField, you will need to reimplement the operator(==) according to the new condition.
See for instance timeVaryingUniformFixedValueFvPatchField.C
for a good example

If it is a gradient-based conditions you need to implement something similar for the gradient. Look at for instance wallBuoyantPressureFvPatchScalarField.C

Most derived boundary conditions in finiteVolume/fields/fvPatchFields/derivedFvPatchFields
have either fixedGradient or fixedValue as a base class, reading in extra fields as needed.
A good step is to copy one which is closest to what you wish to implement to your personal application-dir and compile it into $FOAM_USER_LIBBIN, keeping it separate from the ones supplied by OpenFOAM.


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