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
5
votes
1 answer

paraview: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory

I installed OpenFOAM on Ubuntu (which is itself on WSL Windows Subsystem for Linux). I have a problem when trying to launch paraFoam and I have this error : Invalid $PV_PLUGIN_PATH and -plugin-path= not defined No supplementary ParaView/OpenFOAM…
Taendyr
  • 89
  • 1
  • 1
  • 9
5
votes
2 answers

Paraview - Using python script to export data in x3d format

I am trying to export in x3d format OpenFOAM results using paraview-python script. When I do it via paraview graphical interface it works and results can be visualized in Blender, see the following picture However, when I try to do the same…
Sim81
  • 1,574
  • 2
  • 9
  • 15
5
votes
1 answer

How to select all mesh regions in ParaView OpenFOAM case using python scripting?

Loading an OpenFOAM case in ParaView using python is straight forward with: ofReader = OpenFOAMReader(FileName='') However, by default only the internalMesh mesh region is selected in the reader object. Using the trace…
Woltan
  • 13,723
  • 15
  • 78
  • 104
4
votes
2 answers

Error loading Python modules when embedding Python in C++ OpenFOAM

TL;DR I'm trying to run Python embedded in OpenFOAM in C++, but including some Python modules is causing OpenFOAM to fail even though the Python script seems to work fine by itself. I've tried appending the module locations to the Python path but it…
MUD
  • 121
  • 1
  • 13
4
votes
1 answer

How to parse OpenFoam polyMesh in binary stream format?

I'm working on a tool that needs to parse the OpenFoam polyMesh files (points, faces, boundary). At this moment the tool can only parse the ASCII format of the polyMesh files and what I will need to add is the support for binary as well. How can I…
Daniel
  • 544
  • 1
  • 10
  • 21
4
votes
0 answers

What file types can be visualized in ParaView using NVIDIA IndeX plugin?

I have made some work using OpenFOAM and now want to visualize my data using ParaView, when I loaded .foam file and some .stl files, I cannot see the NVIDIA IndeX option from the dropdown, thus I assume that not all the data type can be rendered by…
4
votes
2 answers

openfoam: flex yyin.rdbuf(std::cin.rdbuf() error

I want to report a solution to an error I got while installing OpenFOAM 3.0.1 in Mac OS X El Capitan Version 10.11.2 The error was: "error: member reference type 'std::istream *' (aka 'basic_istream *') is a pointer; maybe you meant to use '->'? …
3
votes
6 answers

Python Pandas - Read csv with commented header line

I want to read and process a csv file with pandas. The file (as seen below) contains multiple header lines which are indicated by a # tag. I can import that file easily by using import pandas as pd file = "data.csv" data = pd.read_csv(file,…
Sunsheep
  • 52
  • 1
  • 6
3
votes
3 answers

Python-Regular expressions: extract a list of tuples after a keyword from a text file

I want to implement a simplified version of what I have suggested here to import some vertices from an OpenFOAM blockMeshDict file and then visualize them with FreeCAD. the part of the file I'm interested in is a list of tuples (xi yi zi)s of…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
3
votes
1 answer

Read a VTK file with python

I have the following VTK file, which is generate by OpenFOAM: # vtk DataFile Version 2.0 sampleSurface ASCII DATASET POLYDATA POINTS 4 float 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 0.0 1.0 1.0 0.0 POLYGONS 2 8 3 0 1 2 3 2 1 3 POINT_DATA 4 FIELD attributes…
Marcel
  • 464
  • 1
  • 6
  • 12
2
votes
1 answer

how to Prepar/Use docker executor/pull docker image openfoamplus/of_v1612plus_centos66?

I am trying to pull and run docker image openfoamplus/of_v1612plus_centos66 as follows: I have used this main Command docker container run -ti cfdengine/openfoam The name of openfoamplus (1612+) by using the following command to get the…
khaled
  • 33
  • 7
2
votes
0 answers

X2Go Error: X server does not support XInput 2

I am using the remote desktop software X2Go to use an Ubuntu 20.04 linux workstation from remote. I am tunneling from an Ubuntu 20.04 laptop. Initially, everything seems to work fine. When I start paraFoam, i get the following error…
MrLukas
  • 167
  • 1
  • 12
2
votes
1 answer

Running OpenFOAM native compile on a non-admin Windows

I have downloaded and installed a Windows native compiled OpenFOAM from here. But when I try to run any of the OF commands (e.g., blockMesh, foamDictionary, ...) in the MSYS2 terminal I get the…
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
2
votes
0 answers

can't compile OpenFOAM v1912 with intel icc and intelmpi

! UPDATE on 28 Feb, 2020: The problem is solved. please refer to :https://develop.openfoam.com/Development/openfoam/issues/1608 Summary I'm new to OpenFOAM and I'm trying to compile OpenFOAM-v1912 using Icc and IntelMPI, only to find the following…
YipZLF
  • 21
  • 2
2
votes
3 answers

Defining and initializing a List separately in C++

I am writing a plugin for the CFD software OpenFOAM in C++. My code will read information from each cell in the model (>100k cells) for each time step of the analysis. I have a list of lists of doubles called C that is initialized with zeros in the…
1
2 3
12 13