Questions tagged [openfoam]

OpenFOAM is a free, open source CFD software package developed by OpenCFD Ltd at ESI Group and distributed by the OpenFOAM Foundation.

Filter by
Sorted by
Tagged with
0 votes
1 answer
144 views

Can I use periodic boundary conditions for `U` but not for `p`?

Cross-posted from Stack Overflow. (https://stackoverflow.com/questions/70686368/can-i-use-periodic-boundary-conditions-for-u-but-not-for-p) I am trying to numerically compute the drag force around a ...
user avatar
0 votes
1 answer
203 views

Openfoam: simplefoam: command not found

I was trying to install OpenFoam exactly as mentioned on their website. But when I run simpleFoam -help it says command not found, even after restarting my PC. I am ...
user avatar
2 votes
0 answers
88 views

What is temporal order of accuracy of the PISO algorithm?

A few Computational Fluid Dynamics (CFD) codes implement the so called PISO (Pressure-Implicit with Splitting of Operators) algorithm for pressure-velocity coupling. My concern is what is actual ...
user avatar
2 votes
1 answer
856 views

How to calculate skewness for a mesh?

I am writing a code to calculate mesh quality stats such as: cell volume, face areas and non-orthogonality between faces (basically something like OpenFOAM's ...
user avatar
  • 284
2 votes
3 answers
313 views

Flux sign and face normal confusion in finite volume method

I implemented a solver for the 2D steady-state heat equation (without heat generation and homogeneous material) $\nabla. (k\nabla T) = 0$, using finite volume method, however, I am having some ...
user avatar
  • 284
0 votes
1 answer
172 views

Getting streamline for a lid driven cavity flow in openFoam/ParaView

I have installed openFoam on Debian GNU/Linux and learning from official user guide. I have a problem with generating streamlines. I am trying to generate streamlines as explained in the post ...
user avatar
  • 121
0 votes
1 answer
1k views

Differences between openfoam and freefem/fenics

I know a little about fenics and freefem. There exists a big difference between those and OpenFoam? They are used in a similar way (editing a file and writing code)? or perhaps it is made for other ...
user avatar
  • 503
1 vote
2 answers
313 views

Why OpenFOAM uses its own data structures and linear solvers?

I wonder why OpenFOAM code has its own data structures Lists, HashTables, ... etc. when there is the STL in C++? Another ...
user avatar
4 votes
1 answer
1k views

Can Julia be used to create a large-scale CFD software like OpenFOAM?

I have some experience with some programming languages like C/C++, Fortran, Python, etc but recently, I am getting interested in Julia. But, I am wondering if Julia could be used to create some large ...
user avatar
0 votes
0 answers
69 views

The relation between PDE order and discretization order

In Jasak's Ph.D. thesis (2000), a notion is given about discretization of a transport equation: For good accuracy, it is necessary for the order of the discretization to be equal to or higher than the ...
user avatar
  • 235
2 votes
3 answers
495 views

How is central difference scheme second-order accurate?

In an arbitrarily unstructured mesh, shown in the figure below, in the context of finite volume method, I want to obtain an approximation of $\phi_f$, where $N$ and $P$ are cell centers of adjacent ...
user avatar
  • 235
1 vote
1 answer
950 views

How to let OpenFOAM write output at fixed time intervals _and_ keep the last few steps?

As described in https://openfoam.com/documentation/user-guide/controlDict.php I can use writeControl timeStep writeInterval 1 purgeWrite 10 to keep the ...
user avatar
2 votes
0 answers
354 views

Understanding MP-PIC implementation in OpenFOAM

The multiphase particle-in-cell (MP-PIC) method is characterized by mapping particle properties from the Lagrangian coordinates to the Eulerian grid. However, the implementation of this method in ...
user avatar
1 vote
0 answers
40 views

Need suggestions about technical difficulties - Drying + Pyrolysis of coal particle

In OpenFOAM by default, the FireFOAM is well supported for solid pyrolysis modeling. With that in mind, I managed to built my solver for a modified version of pyrolysis (for dry coal - without ...
user avatar
1 vote
0 answers
371 views

OpenFOAM and CFDEM on GPU

I have a simulation project written for OpenFOAM and CFDEM and would like to find an alternative to run it on GPU since raising the number of cores already provided a promising speed up and ...
user avatar
1 vote
1 answer
95 views

Is "Gradient Computation" in Finite Volume Discretization Really 2nd order accurate?

Based on this, pp 245, we go through these steps to discretize a gradient statement, namely $\nabla\phi$: 1- Gauss theorem reads, $$ \int_V\nabla \phi dV = \oint_{\partial V}\phi dS $$ 2- Integral ...
user avatar
  • 235
0 votes
1 answer
63 views

Is open foam Mac version compatible with Linux version

I am recently starting with OpenFoam. I have a Mac as my personal laptop, but I would have to use OpenFoam on linux in my lab. So my questions are: 1) Is the OpenFoam software independent of OS, so ...
user avatar
1 vote
1 answer
288 views

Can OpenFoam be used for interactive simulations (flying a plane)?

I'm a software engineer and I've just started to fly rc-planes. I'm currently building a self learning auto-pilot for my plane and I'm really interested in CFD. I installed OpenFOAM and ran through ...
user avatar
  • 113
-2 votes
1 answer
2k views

openFoam - How to create an intermediate scalar variable and output it?

For learning purposes, how do I create an scalar variable like temperature divided by 2 and outputs it on files generated?
user avatar
2 votes
1 answer
4k views

How are dimension units on openFoam? [closed]

When I open U for example, I find: dimensions [0 1 -1 0 0 0 0] That means m/s What are the other dimensions?
user avatar
1 vote
2 answers
3k views

Demo example for OpenFOAM with CUDA

I am looking for a simple usage example/demo of OpenFOAM + CUDA and would like to understand how exactly OpenFOAM benefits from CUDA. The thing is I do not have any background in fluid dynamics and so ...
user avatar
  • 181
2 votes
1 answer
3k views

SnappyHexMesh and multi stl geometry

I am quite new in snappyhexmesh and OpenFoam world and I am trying to mesh a multi stl geometry. My geometry is a geometry which is split in 3 different stl files. Globally it is closed, but each ...
user avatar
  • 382
0 votes
0 answers
89 views

Reconstruction of cells information when given mesh in polyMesh format [duplicate]

The polyMesh format used in OpenFOAM is an intelligent format for which 'cells' file, i.e. the file giving list of nodes that make a cell, is not needed. The way to reconstruct geometry data such as ...
user avatar
5 votes
1 answer
560 views

Finite volume a posteriori error estimation

I'm wondering what alternatives there are to a grid convergence study to judge solution accuracy for a given grid resolution when doing steady-state RANS simulations on an automatically generated ...
user avatar
  • 719
1 vote
1 answer
2k views

OpenFoam Mapped Boundary condition [closed]

I am using OpenFoam to do an LES simulation. I am using mapped boundary condition on the inlet plane. I know it maps from a source plane to the target plane(here the inlet plane). In "Pitzdaily-mapped"...
user avatar
  • 25
2 votes
2 answers
735 views

Getting adjacent cells map for an unstructured polyhedral mesh

I am doing a little project on solving the heat equation using finite-volume method on a solid cube, I converted the polyhedral mesh of the cube to an OpenFOAM mesh. I have a Python code where I ...
user avatar
  • 284
1 vote
1 answer
185 views

Is OPENFOAM a good idea for direction/operator splitting in parabolic equation

I would like to know if I should switch to OPENFOAM for my task. I work only with Cartesian grids, right now in 2d, rectangular domains only. If $\mathbf{w} = (w_1, w_2)$ and suppose I want to solve ...
user avatar
  • 435
4 votes
1 answer
381 views

OpenFOAM precipitation/crystallisation reaction solver

This question is probably related to chemical engineers that are around this forum. I am looking into writing a solver for a precipitation reaction (struvite to be precise): A+B+C+D <=> E+F A, B, ...
user avatar
2 votes
1 answer
674 views

openfoam - Programming customized PDEs

I am looking for a method to automatically solve custom PDEs on a custom control volume. Specifically I would like to solve equations similar (but not exactly alike) to: $$\frac{\partial y}{\partial ...
user avatar
  • 155
1 vote
1 answer
832 views

oscillating flow inlet BC

I want to do LES of an oscillating flow i.e. a sinusoidal flow without a mean component in a channel. In order to have a fully developed flow at lower mesh count without using a long channel I want to ...
user avatar
3 votes
1 answer
823 views

Add User-defined/custom differential equations in OpenFoam (CFD)

I am new to OpenFoam. And I am trying to add a set (user defined) of differential equations to OpenFoam. I want to solve this user defined set of equations at each time point in addition to standard ...
user avatar
  • 31
2 votes
2 answers
323 views

Model of heat sink problem with fan

I am trying to solve this problem using advection-diffusion model and finite element method for the solution, due to the complex geometry. Basically the problem i'm trying to solve using OpenFOAM is ...
user avatar
2 votes
3 answers
1k views

How to get discretization coefficients of matrix A in Finite Volume Method (FVM)?

First we have Discretization of the Transport Equation $$ \frac{\partial \rho \phi}{\partial t} + \nabla(\rho U \phi) - \nabla (\rho \Gamma_\phi \nabla \phi) = S_\phi (\phi) $$ In Finite Volume ...
user avatar
2 votes
1 answer
3k views

Modelling rotating machinery other than AMI rotating meshes

I have case of a rotating fan at Low- speed ie about 300-400 rpm. I have successfully carried out RAS simulations using cyclicAMI approach where, the motion of the fan is modeled as rigid body ...
user avatar
  • 247
2 votes
1 answer
2k views

A Simple Standard Test Case for Pipe Flow

Original Question I am familiarising myself with OpenFOAM and want to run a simple pipe flow case. I would like to be able to compare my computational pipe-flow results to a well established case (...
user avatar
1 vote
1 answer
265 views

a reverse of foamToVTK tool?

my question is simple, in openfoam we have the function foamToVTK which creates vtk files for each timestep of the solution. Now I have a huge VTK tar file (has atleast 100 timesteps), i have system ...
user avatar
  • 247
5 votes
1 answer
2k views

CFD: Can one calculate the dimensionless wall distance $y^+$ a priori?

perhaps the most idiotic question I ever asked. people throw around the parameter $y^+$, as if it is the be all and end all of CFD (Computational Fluid Dynamics) parameters and use it as if everyone ...
user avatar
  • 247
2 votes
2 answers
2k views

openFOAM RAS to LES

I successfully ran a RANS simulation of industrial fan with all wall BCs, pimpleDyMFoam solver and spallart-almaras RAS model. I got results upto some time, I would like to continue that simulation ...
user avatar
  • 247
1 vote
1 answer
3k views

how to specify an arbitrary surface for field average in openfoam?

So, I am running this openfoam simulation and I need areaAverage velocity and pressure on a surface,currently the entire plane is being read, I wan't to specify my own in sampleSurfaceDict, ...
user avatar
  • 247
0 votes
2 answers
2k views

mesh spatial dimension in OpenFOAM

My default mesh geometry length is in 80 mm. For OpenFoam, I scaled the mesh in meters as 0.008 m. Once I import the mesh in OpenFOAM, it is a collection of point coordinates. Now, the location of ...
user avatar
  • 103
6 votes
0 answers
2k views

What is the best OpenFOAM RAS turbulence model for a motorbike/vespa problem?

I am learning OpenFOAM as a hobby and using my Vespa racing as the topic to apply it to. The objective is to produce modifications that improve the top speed (as well as getting some values such as ...
user avatar
-1 votes
1 answer
819 views

Open Foam User Guide Tutorial [closed]

I am trying to follow the Openfoam user guide but I'm stuck at the first tutorial 1. In fact, when I try to run the blockMesh command (using the administrator account), the following appears: ...
user avatar
1 vote
1 answer
518 views

OpenFOAM-CFD, human body grid

I am new user of OpenFOAM, I have to generate a grid of a human body to calculate the convective heat transfer between the body and the environment. Can someone guide me please? Thanks in advance ...
user avatar
  • 11
8 votes
1 answer
3k views

OpenFoam vs FiPy

I need to learn and utilize a finite volume automated solution package for a project I'm working on and have narrowed it down to these two packages. I was wondering if anybody has experience of both ...
user avatar
  • 338
5 votes
1 answer
9k views

Adjusting the time step dynamically in OpenFOAM?

I'm experimenting with OpenFOAM. In my simulation of a time-dependent, transitional flow the Courant number remains well below 1 for a certain period but then rises, eventually leading to a floating ...
user avatar
  • 333
6 votes
2 answers
1k views

Transitional flow in OpenFOAM

Is it possible to simulate transitional flow in OpenFOAM? Or, alternatively, does it make sense to use k-epsilon or k-omega model with low Reynolds number? If not, why? What kind of errors would ...
user avatar
  • 333
2 votes
0 answers
1k views

Can post-processing use topoSet and createPatch without screwing up the results?

I would like to use patchAverage to obtain the average pressure on an object that consists of multiple patches (due to different boundary conditions), however ...
user avatar
5 votes
1 answer
6k views

How to create zero thickness internal walls in a given mesh in OpenFOAM?

I know using topoSet and subsetMesh along the lines of the ...
user avatar
6 votes
1 answer
8k views

How to set up the dynamic mesh for a piston moving through a tube of variable diameter?

The tutorial case incompressible/pimpleDyMFoam/movingCone describes a cone moving through a "tube" (if you change the far-field patch into a wall) of constant ...
user avatar
3 votes
2 answers
3k views

How to let OpenFOAM abort a simulation when values exceed a given range?

When the absolute pressure becomes negative or $U$ exceeds the speed of light, things have pretty obviously gone wrong (be that bad boundary conditions, a too coarse mesh, a too large timestep etc.). ...
user avatar