Blog Entries

 Register Blogs Members List Search Today's Posts Mark Forums Read

Pressure units in incompressible solvers

Posted February 23, 2017 at 04:17 by kindle

Quote:
Originally Posted by Per
Hi

I am quite new to OpenFOAM, and have some basic questions about units. From the tutorial cases I see that the units for pressure in incompressible solvers (e.g. simpleFoam) are m^2/s^2. Which make sense since pressure is constant. I guess I then have to scale (divide) my pressure initial and boundary conditions with rho in order to get a correct solution? My real question is: can I define my pressure units to be kg/ms^2 and define density rho in the transportProperties file
...
New Member
Posted in Uncategorized

Prgramming BC

Posted February 23, 2017 at 04:16 by kindle
Updated June 7, 2017 at 12:19 by kindle

The beginning of a openfoam programming

Quote:
Originally Posted by hani
This thread actually belongs in preprocessing. Anyway, Chen actually describes the basics of how to set your boundary conditions. It is however a bit difficult to understand for a beginner. Let me, as a slightly more than beginner try to help you in a more detailed way (there might be other solutions also):

It is unlikely that there is such a boundary condition already implemented and distributed in OpenFoam. You will have to implement
...
New Member
Posted in programming

non-uniform boundray condition - solution parabolicVelocityFvPatchV ectorField

Posted February 23, 2017 at 04:16 by kindle
Updated June 7, 2017 at 12:19 by kindle

From

http://www.tfd.chalmers.se/~hani/kur...yCondition.pdf

https://sourceforge.net/p/openfoam-e...bolicVelocity/

Compile the shared object (library) and add
Quote:
libs ("libmyBCs.so");
to system/controlDict

it will be linked ONLY at run time by LD_LIBRARY_PATH. It is linked using...
New Member
Posted in programming

OpenFOAM coding style

Posted February 23, 2017 at 04:15 by kindle

1. Class.H is the declaration of class and Class.C is its definition. Sometimes inline functions are defined in ClassI.H.

Ex: VectorSpace.H includes VectorSpaceI.H but outside the namespace Foam.
In the VectorSpaceI.H defines the inline constructors, member functions, operators, global functions, global operators and all these are in defined in the {} of

namespace Foam {

}

VectorSpace.C includes VectorSpace.H at the very begining,...
New Member

Posted February 21, 2017 at 13:04 by kindle

I copied a derived boundary condition from src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet modified and recompiled it in user directory. It compiles and I name the new library libturbulentInletUser.
When using it in a simluation. Running the solver seems all right but I get "corrupted double-linked list" when I call "blockMesh" or "decomposePar".

In the source code, all classes in finiteVolume is compiled as a single library which contains...
New Member
Posted in Good habit, runtime