Questions tagged [openfoam]

OpenFOAM is a free, open source computational fluid dynamics (CFD) software package released free and open-source under the GNU General Public License.

OpenFOAM has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.

The three main forks of OpenFOAM can be found through the following links:

OpenCFD Ltd (ESI Group): http://www.openfoam.com/

The OpenFOAM Foundation Ltd: https://openfoam.org/

OpenFOAM Unofficial Extend Project: https://github.com/Unofficial-Extend-Project-Mirror

Models are implemented using an equation syntax that closely follows the mathematical notation, e.g. to evolve the P-1 radiation model:

∇ ⋅ ( Γ ∇ G ) − a G = − 4 ϵ σ T 4 − E

the following code is used:

// Solve G transport equation
solve
(
    fvm::laplacian(gamma, G_)
  - fvm::Sp(a_, G_)
 ==
  - 4.0*(e_*physicoChemical::sigma*pow4(T_)) - E_
);

Many applications are supplied ready-to-use with the code together with a tutorial suite to showcase the functionality. As an open-source tool, users are able to see the inner workings of the algorithms and models, providing a robust platform for future developments and collaborative research.

189 questions
1
vote
4 answers

Python script for plotting the evolution of charts such as Paraview does

I want to code a python script that generates a plot like the one shown to the right in the next screenshot from Paraview: I have a series of files generated with the command foamToVTK: Is there in VTK any function similar to PlotOverLine method…
Bub Espinja
  • 4,029
  • 2
  • 29
  • 46
1
vote
0 answers

How to apply clustering algorithms to a volume surface?

I’m trying to compare some OpenFOAM CFD simulations that reproduce the flow through an almost spherical object(the object is a reconstruction, with an irregular shape), searching for the one with the smallest cluster of wall shear stress. So, I want…
1
vote
1 answer

LMOD TCL execute bash script while loading module

On our new cluster we use LMod as environmental module system. Creating a Module TCL Script for OpenFOAM, a system-dependent bashrc file need to be loaded. This is the TCL script which I am using on another module system, it works fine. I am not…
1
vote
0 answers

Using GDB to go through OpenFOAM source codes

I'm a newbie using OpenFOAM-6. I'm trying to read the source codes by GDB. However, I cannot understand why GDB cannot step into the constructor of some classes like fvMesh. Also GDB reports something like (gdb) p mesh $1 = I…
石京昶
  • 31
  • 6
1
vote
1 answer

Bizarre hang in python when subprocess returns an error

I have a python program designed to evolve a 3d model which is CFD analyzed in OpenFOAM. The analysis is conducted in parallel with a program called "mpirun"; my python script runs mpirun via subprocess.Popen. Nothing unusual so far. What is…
KarenRei
  • 589
  • 6
  • 13
1
vote
1 answer

How to make a text-based interface (TUI/TLI) for monitoring OpenFOAM solver log file?

I'm running OpenFOAM simulations on a cluster and they take days to finish. I am looking for a way to monitor the process and get some meaningful insights. What I can do for the moment is to watch the tail of the log file using watch tail -n 15…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

sonicFoam forwardStep realistic boundary conditions leads to error::printStack(Foam::Ostream&)

I'm trying to modify the sonicFoam forwardStep example with more realistic boundary conditions. In 0/p : //internalField uniform 1; internalField uniform 100000; boundaryField { inlet { type fixedValue; //value …
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

Axisymmetric blockMeshDict: FOAM FATAL ERROR: wedge ... centre plane does not align with a coordinate plane by

I'm trying to follow this tutorial to create the axisymmetric model below: Following the discussions over here, my blockMeshDict file is: FoamFile { version 2.0; format ascii; class dictionary; object …
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

Including function from another file gives scope error (openFoam)

This question is about openFoam (foam extend v4) C++ but I believe the issue I have is a fundamental C++ programming problem. I am trying to use the function autoCreateOmega whose prototype can be found…
Dipole
  • 1,840
  • 2
  • 24
  • 35
1
vote
1 answer

First token could not be read or is not the keyword 'FoamFile' in OpenFOAM

I am a beginner to programming. I am trying to run a simulation of a combustion chamber using reactingFoam. I have modified the counterflow2D tutorial. For those who maybe don't know OpenFOAM, it is a programme built in C++ but it does not require…
edugius
  • 13
  • 5
1
vote
2 answers

Openfoam - pisoFoam only uses one core

I use openfoam Version 1606+ When I run pisoFoam, in htop (to show CPU Usage) I can see that pisoFoam only uses one core (of course usage 99%). What do I have to modify if I want to use all cores of my CPU? Best regards
unimetal
  • 41
  • 6
1
vote
1 answer

OpenFOAM: FOAM FATAL ERROR: Unknown TurbulenceModel type RASModel

I'm trying to follow this OpenFOAM tutorial for using Gmsh to generate Axisymmetric mesh. The files are provided here. However when I try to solve the problem using the pimpleFoam solver I get the error: --> FOAM FATAL ERROR: Unknown…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

How to install packages on OpenFOAM docker-machine - boot2docker: bash: tce-load: command not found

I'm trying to install some packages on the OpenFOAM docker-machine image which is based on boot2docker. When running the uname -a command I get the info: Linux default 4.4.111-boot2docker #1 SMP Thu Jan 11 16:25:31 UTC 2018 x86_64 x86_64 x86_64…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
1
vote
1 answer

Software installation:--add-needed

I am having hard time installing OpenFoam from source. When I execute ./Allwmake I get the following error message: --add-needed is not supported but is required for libopen-rte.so.20 in libmpi.so I have searched forums for similar --add-needed…
Shibli
  • 5,879
  • 13
  • 62
  • 126
1
vote
1 answer

Tutorial for using snappyHexMesh with a STL file in OpenFOAM

I have created a vehicle and output a STL file. First I want to use snappyHexMesh to convert the STL file to the proper format for OpenFOAM. Then I want to run a few airflow simulations I am using OpenFOAM's 5.x and my case directory is here:…
AG1
  • 6,648
  • 8
  • 40
  • 57