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

Environment variable error while trying to create a solver in OpenFOAM 9

I'm trying to create a solver in my /opt/OpenFOAM/OpenFOAM-9/applications/solvers/electromagnetics directory using sudo foamNewSource App newSolver. But, I keep getting the following error: foamNewSource: Creating new interface file…
riedaug
  • 15
  • 6
1
vote
1 answer

How to get nodal values in OpenFOAM?

I would appreciate knowing how I can convert the cell values given after the OpenFOAM solution into the ones on the grid points. Is there any direct command for such a thing or I should work with the sampling option? Thanks a lot for your help.
1
vote
1 answer

How to read dictionary variable in 0/U file in OpenFOAM

I wanted to read the viscosity variable "nu" of "transportProperties" dictionary in the inlet boundary in 0/U as follows: boundaryField { inlet { type codedFixedValue; value uniform (0.006 0 0); name …
1
vote
2 answers

OpenFOAM simple blockMesh floating point exception

I am learning OpenFOAM step by step, and am currently trying to create a very simple mesh with the blockMesh tool, but keep getting a floating point exception. My blockMeshDict is written in almost exact correspondence to the meshing tutorial in the…
Andrii Kozytskyi
  • 123
  • 2
  • 11
1
vote
2 answers

OpenFOAM how to remove some elements from a List?

In OpenFOAM, I can access the list of times of my simulation, as follows: const auto& tlist = mesh.time().times(); //or runTime.times(); Just think of this in the context of a custom function object, where you want to access the list of times. When…
1
vote
1 answer

"could not find mandatory..." error when trying to run tutorial case in OpenFOAM version 8

I'm trying to learn about OpenFOAM Computational Fluid Dynamics software in order to use it for my undergraduate thesis. I am currently following Joszef Nagy's tutorial to run your first simulation. Everything up to about the 18:30 mark has worked…
K.defaoite
  • 103
  • 1
  • 8
1
vote
0 answers

How to overcome Failed to load vtkClientServerPython?

I have to run some paraview trace file in python to automate the process. For this, I have I am trying to import paraview as from paraview.simple import * But, it is showing me an error as "Failed to load vtkClientServerPython: No module named…
rasunag27
  • 55
  • 4
  • 11
1
vote
1 answer

IndexError: List index out of range with glob(), rsplit()

I am trying to execute a python script which is giving me an IndexError. I understood that the rsplit() method failed to split the string. I don't exactly know why it is showing index out of range. Could anyone tell me how to solve this problem…
spkumar
  • 15
  • 4
1
vote
0 answers

note: in expansion of macro ‘WarningInFunction’ and warning: this statement may fall through [-Wimplicit-fallthrough=]

I am trying to convert a solver from older version of OpenFOAM to newer version. I made the required changes and code got compiled but it was not a clean compilation. I am getting a lot of warnings and notes…
PP_berry
  • 11
  • 3
1
vote
1 answer

Converting a column into floats except first few rows i.e selective conversion in a column

I m trying to do some data processing but I m getting the same error everytime. My dataframe (con_tc) looks like this as follows:- Index u_p0 u_p1 u_p2.........u_p100 x 0 0 0 0 y 0 …
1
vote
0 answers

How to use a Pytorch-based neural network in openfoam?

Could someone please explain me how to use a Pytorch-based neural network in CFD calculations using openFOAM? I am a total newbie and could not find a good explanation and have no idea how to get started with that.
Arsen
  • 131
  • 10
1
vote
1 answer

Command run in terminal but not in QProcess while PATHs are inserted

I want to run a command in Ubuntu via Qt using QProcess. My command is fluent3DMeshToFoam and when I run it into terminal its OK and produces sum output and files in a specific location. But I have problem with running it using…
s.abbaasi
  • 952
  • 6
  • 14
1
vote
4 answers

openfoam v2006 wsl2 ubuntu 20.04 GLIBCXX_3.4.26 not found

Since I installed according to the guide here on wsl2 ubuntu 20.04, I've been having errors related to libstc++.so.6, specifically GLIBCXX_3.4.26 not found (required by ...) where ... refers to different files within…
umayfindurself
  • 123
  • 3
  • 18
1
vote
1 answer

openFOAM- visualize vtk files on web viewer VTK.js

I would like to visualize the vtk files from openFOAM on the web viewer VTK.js. However, it seems like the vtk files cannot be loaded directly and I might need to convert them to other formats such as vti or vtp. Do you know a simple way to convert…
Sim81
  • 1,574
  • 2
  • 9
  • 15
1
vote
1 answer

How to resolve gmsh Mesh generation errors

I am trying to 3D mesh 10 ellipses with various aspect ratio's for an OpenFOAM simulation. I've noticed that I'm getting the same 3 meshing errors when I try to generate a 3D mesh. The 3 error messages are: Error: Unable to recover the edge 405…
RobotBarry
  • 73
  • 2
  • 11
1 2
3
12 13