CFD Online Logo CFD Online URL
Home > Forums

Blog Entries

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


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
Views 90 Comments 0 kindle is offline Edit Tags

corrupted double-linked list

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
Views 55 Comments 0 kindle is offline Edit Tags

LES: Turbulent Channel Flow without initial solution (BC)

Posted February 21, 2017 at 10:33 by kindle
Updated February 23, 2017 at 04:02 by kindle

In this post, the kinetic energy is monitered and the turbulentInlet condition is explained. We cannot use Reynolds averaged profile as inlet, because it is only seen by time average.

While monitering kinetic energy of all flow (not just the turbulent part), when this value tends to some stable state the mean and the turbulent part is then established.

Originally Posted by Lieven View Post
Hi Danesh,

Averaged profiles are not instantaneous profiles. You will never see them in real life as in 'hey
New Member
Posted in Pre-processing
Views 47 Comments 0 kindle is offline Edit Tags

Inlet velocity profile using swak4Foam

Posted February 16, 2017 at 05:29 by kindle

The problem of this is that groovy can impose an inlet profile but cannot take data downstream (this is the main difficulty) and then rescale to the entry. Adding fluctuation is straight forward.

Originally Posted by zordiack View Post
Hi, I wanted a fully developed inlet velocity profile for my 3D-case and I decided to implement it using swak4Foam since I couldn't figure out how to do it with native OpenFOAM tools. So, I thought I'd share my solution here since it took me a while to figure it out.

Please note
New Member
Posted in Pre-processing
Views 57 Comments 0 kindle is offline Edit Tags

Wall Function

Posted February 14, 2017 at 16:25 by bfox48

Originally Posted by firb86 View Post
Does Flow 3D have a wall functions? How does the phenomenon solve when y+>5?

Best regards

When the turbulence models are turned on, then FLOW3D applies the logarithmic wall function in the cells intersecting a surface. It assumes the center of the cells is with the turbulent region of the logarithmic velocity profile, which is approx: 30<y+<1000.

Lots of explanation in the user manual.
New Member
Posted in Uncategorized
Views 107 Comments 0 bfox48 is offline Edit Tags

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