Science topic
OpenFOAM - Science topic
Explore the latest questions and answers in OpenFOAM, and find OpenFOAM experts.
Questions related to OpenFOAM
Hello,
Sorry for the long post, but I need help troubleshooting a CFD simulation.
I’m trying to simulate airflow in a classroom with students and tables. The classroom has:
- 3 inlets (vents on the roof),
- 3 outlets (also vents),
- 1 door, and
- 3 windows (considered as "walls" since they are closed).
The room dimensions are 3 x 5 x 8 meters. To avoid errors with ideasFoam, I modeled the humans as cylinders with a mouth. The cylinder bases are linked to the floor, and the tables are attached to the walls. When I created the mesh, the cylinder bases became part of the floor, and one face of each table was linked to the wall. This setup allowed ideasFoam to function without errors.
I refined the mesh multiple times, and checkMesh reports no issues.
Next, I used createBaffles to add face zones to the boundary file, as everything inside the box was initially added to the faceZones file, not boundary. Once the boundaries were correctly updated, I defined:
- 3 tables and 4 humans (excluding the mouth) as walls.
- Inlets, outlets, and mouths as patches.
(This is a simplified test setup. Once it works, I plan to include all students and tables.)
After preparing everything, I ran simpleFoam with the setup. To ensure stability, I:
- Reduced the time step (deltaT),
- Adjusted relaxation factors, and
- Tightened solver tolerances (resTol).
Unfortunately, the simulation crashed immediately.
When I changed the solver for p (pressure) to PCG, the simulation ran. It converged smoothly with a small time step (deltaT = 0.001) until 1.5 seconds. However, after this point, the bounding k starts to increase steadily, reaching unrealistic values (e.g., max: 9.38163e+07).
Do you have any insights into what I might be doing wrong?
Here are the files I used:
- boundary
- U
- p
- k
- epsilon
- nut
- fvSchemes
- fvSolution
Thank you in advance for your help!
Here's an example of the spike :
Time = 3s
smoothSolver: Solving for Ux, Initial residual = 0.00371234, Final residual = 6.68207e-06, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00396574, Final residual = 1.20463e-05, No Iterations 2
smoothSolver: Solving for Uz, Initial residual = 0.00397317, Final residual = 1.27557e-05, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.000101223, Final residual = 9.75821e-06, No Iterations 35
DICPCG: Solving for p, Initial residual = 3.88401e-05, Final residual = 9.83166e-06, No Iterations 21
DICPCG: Solving for p, Initial residual = 1.7923e-05, Final residual = 9.83142e-06, No Iterations 17
time step continuity errors : sum local = 3.33501e-05, global = 2.51784e-05
DICPCG: Solving for p, Initial residual = 8.00657e-05, Final residual = 9.98959e-06, No Iterations 35
DICPCG: Solving for p, Initial residual = 3.17717e-05, Final residual = 9.49924e-06, No Iterations 21
DICPCG: Solving for p, Initial residual = 1.54928e-05, Final residual = 9.994e-06, No Iterations 1
time step continuity errors : sum local = 3.37548e-05, global = 2.51818e-05, cumulative = 0.00310968
smoothSolver: Solving for epsilon, Initial residual = 0.00443172, Final residual = 8.7404e-07, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.00427727, Final residual = 2.12083e-06, No Iterations 2
bounding k, min: 1.82005e-16 max: 9.38163e+07 average: 62990.6
ExecutionTime = 8353.48 s ClockTime = 8355 s
We're looking for collaborators in the area of CFD with application in airborne virus transmission reduction. Specifically we're interested in speech-driven airflow and the resultant downstream flow around face-shields (and possibly other types of PPE).
We're especially interested in researchers located in (and possibly around) the African region in countries that could have a full-fee discount for publishing [www.springernature.com/gp/open-science/policies/journal-policies/apc-waiver-countries].
We're currently planning our article that we intend to publish in Nature (or similar) in an 'open-access' way (Nature's 'Scientific Reports', for example. We're happy to co-author this article if we retain full intellectual freedom to continue our R&D (happy to co-design this with you).
We're independent (non-profit-y) researchers located in Australia, with motivations of health equity & disruption (without possible constraints of being more concerned with 'h-index' & similar academic paradigms). If interested or any questions, please contact us. Regards, Nick: nchowlett@pm.me
Is OpenFOAM's k-Omega SST supposed to be run as High (y+ > 30 with WFs) or Low Re (y+ < 5 and no-WFs) ? Through the internet I have read many thoughts upon this topic.
In OpenFOAM's official site it states both formulations, but i was wondering if I run High-Re doesn't it mean I am essentialy using k-ε model (as SST blends k-e and k-omega for farfield and near wall regions respectively) ?
Hi everyone,
I plan to use fluid dynamics software to simulate the scour problem of monopile of offshore wind turbines, which is similar to the well-known bridge scour problem. I want to use this numerical simulation to get the depth of scour and the change in pore water pressure in the seabed. Now the more famous fluid mechanics software include OpenFOAM, Fluent and Flow3D, etc. Which is easier to learn? I already know that OpenFOAM is the most difficult. Which is better to learn, fluent or flow3D?
Best regards,
Ben
I'm thinking to do some optimisation of geometric parameters using OpenFOAM to find 'best' design - for a non-profit project. Thinking of using CFD in combo with Machine Learning. Basically a massive parameter sweep using CFD then using those (hopefully) empirical results to predict in-between results via ML. Has anyone tried this before?
Hi everyone, is there a easy way for OpenFOAM to calculate the grid resolution (delta x+, delta y+, and delta z+)?

Keeping Computational Fluid Dynamics (particularly using OpenFOAM) post-processing in Python allows significant advantages, to my mind. Transparency (did I hack my stats models to get lovely pictures that fit the data then say can't show it because of IP?) & risk reduction (does access to foundational code go missing when some business owner gets pissed-off?), namely.
Specifically, access to a whole ecosystem of data analysis capabilities [1]: the ability to hook into R-based [2] statistical modules from Python [3], in addition to Python-based modules [4]. Can be visualised in-depth via PyVista [5].
Other's thoughts? Alternative hypotheses very welcomed!
I am running a coarse DNS case for pipe flow with 2.1 Million cells. My residuals are quite fluctuating as its a fully turbulent annular pipe flow case but its getting statistically converged to a mean value.
My doubt is, the residual values are quite high where its mean is getting converged for instant close to 0.1 or 0.01(refer attached .png), despite of giving tolerance of 1e-06. Due to this I think I have results of velocity profiles and shear stresses quite under predicted.
what can be the possible ways to reduce these residual values?? and what is the reason of having such high residuals??
NOTE: I am already using higher order schemes for solving Fluid flow equations in OpenFOAM

In most common turbulence model studies, when considering Reynolds stresses the components of auto-correlation, <u'2>, <v'2>, <w'2> and components of cross-correlation <u'v'> are considered.
In the research studies of pipe or channel flow only <u'v'> component is taken for the investigation and given importance.
<u'w'> and <v'w'> is commonly not seen in studying parameters, why? is this solely due to magnitude negligibly of w'??
I am working on WMLES (wall Modelled LES) for which if I calculate my wall shear stress analytically and want to enforce it as a boundary condition at the wall patch, so that I do not need to resolve my near wall mesh rather give the wall shear stress as an input. One of the approach is defined by Schumann (1975) -(added an image below for the model formulation by Schumann) which I am trying to implement in OpenFOAM. My major question: Is there any method to define such a boundary condition of shear stress enforcement??
Because as far as the OpenFOAM user guide is concerned I could not find any such options. And the only way to define wall models is by changing the value of \nu_t.

I have been working on fan boundary condition in ANSYS FLUENT. If I'm not wrong I remember providing pressure jump based on axial velocity and in addition tangential and radial velocity component.
I'm currently working on modelling the fan in server and analyses via OpenFOAM. I found this BC fanpressure to be equivalent to fan boundary conditon.
I need to input the fan curve data and provide BC fanPressure for pressure and pressureInletOutletVelocity for velocity. In this case, mass flow rate is calculated by pressure but I need to fix the volume flow rate/mass flow rate in the fans for server.
Can anyone provide me an idea how to do it?
This is a code block from nutWallFunction library in OpenFOAM where in, effective kinematic viscosity ($\nut_w$) at the wall is calculated using resolved field(in case of LES)/ mean field(in case of RANS) and $y^+_p$ (wall normal distance of the first cell center). this allows to set a new viscosity value as boundary condition at the wall using log law. Considering the first cell center is in the logarithmic layer of the universal velocity profile.
Now, in this code block of member function defined as nutUWallFunctionFvPatchScalarField::calcYPlus()
There has been iterations done for the yPlus value to reach convergence with maximum of 10 iterations. Why are these iterations needed? and why is the maximum number of iterations 10. I have given a reference of the code below;
tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
(
const scalarField& magUp
) const
{
const label patchi = patch().index();
const turbulenceModel& turbModel = db().lookupObject<turbulenceModel>
(
IOobject::groupName
(
turbulenceModel::propertiesName,
internalField().group()
)
);
const scalarField& y = turbModel.y()[patchi];
const tmp<scalarField> tnuw = turbModel.nu(patchi);
const scalarField& nuw = tnuw();
tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0));
scalarField& yPlus = tyPlus.ref();
forAll(yPlus, facei)
{
scalar kappaRe = kappa_*magUp[facei]*y[facei]/nuw[facei];
scalar yp = yPlusLam_;
scalar ryPlusLam = 1.0/yp;
int iter = 0;
scalar yPlusLast = 0.0;
do
{
yPlusLast = yp;
yp = (kappaRe + yp)/(1.0 + log(E_*yp));
} while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 );
yPlus[facei] = max(0.0, yp);
}
return tyPlus;
}
My doubt is concerning the do-while loop at the end for yPlus iteration.
I almost finished a book chapter about my resent research (modeling of solid biomass combustion using OpenFOAM) and I want to publish it. In the case of a paper the procedure consists of sending it to a journal, but, how is the process for a book chapter? where I should send the manuscript?
Thank you very much for all your answers.
Keywords: OpenFOAM, topoSetDict, createPatchDict
When Prandtl number is increased for two cases tested over same Rayleigh number, the peak vertical-velocity decreases as Prandtl is increased. This is questionable to the fact that in general terms when Prandtl in increased the velocity boundary layer thickness increases due to increase in momentum diffusivity (\nu)
I'm actually uncertain about the fact that I should treat velocity Boundary layer thickness and peak velocity obtained as two different things.
Also, the current observation is done from the Numerically solved Rayleigh Benard Convection problem in OpenFOAM, with Pr and \nu (kinematic viscosity) as input parameters. For both cases (high and low Pr), \nu value is kept constant and indirectly the input is \kappa (thermal diffusivity) when Pr is changed. (can be a factor to get such behavior for velocity peaks)

I'd like to know if it is possible to couple "Laminar Flow" or "Turbulent Flow" with "Darcy Flow" in COMSOL to model flow exchange between river and river bed. I've seen it has been realized using COMSOL for darcy flow and Openfoam for turbulent flow together. I don't know if it is possible to do in COMSOL alone. Thank you
Hi!
I have made two meshes (say stator and rotor) in snappyHexMesh and merged the two by the utility mergeMeshes to get the complete domain. The checkMesh result is perfect without any issues.
But when I tried to run a solver the following appeared:
"
From function void GGIInterpolation<MasterPatch, SlavePatch>::calcAddressing()
in file /home/bidesh/foam/foam-extend-4.0/src/foam/lnInclude/GGIInterpolationWeights.C at line 304
The master projected polygon was CW instead of CCW. This is strange...
"
Can anyone kindly suggest me how to resolve this issue. Thank you.
hello everyone.
i'm working on a fluid flow into a wavy channel and i wrote a time-varying equation code of pressure for inlet boundary condition of pressure in openfoam and set the "pressureInletOutletVelocity" for inlet of velocity to determine the velocity based on pressure.
the code i have written for inlet of pressure is:
P=p0+Acos(wt)
and naturally it fluctuates at the inlet over the time.
when i set a boundary condition for inlet of velocity to determine it based on pressure ,naturally the velocity have to fluctuate based on pressure fluctuations.
and in low mesh number (30000) the velocity fluctuates based on pressure but in high mesh number it doesn't.
i want you to know the velocity decreases in high mesh number compared to low mesh number.
now, i don't know if it doesn't fluctuate because of the reduced velocity or something else,i increase the initial pressure for having high velocity value but it doesn't work.
anyway the velocity doesn't fluctuate in high mesh number.
if anyone has experience in this matter, i would appreciate it if you could help me.
Hi,
I am simulating a multiphase flow consists of a single droplet simulated under different domain size condition. I would like to utilize AMR in my simulation. However, I encounter a problem whereby AMR is only working with certain domain size and not the other. Are there any strict requirement with the domain sizing or meshing strategies that I need to consider when using AMR?
Here I enclosed the photo of two different domain size. One with domain width of 4-dropletDiameter (working) and the other with 8-dropletDiameter (not working)


Hi OpenFOAM users! I found that using the actuationDiskSource there is a small jump in the velocity field near the actuator disc cells. I couldnt found a solution on internet. Any help?

I am new to this field so I want to do a bit of a research between these two software. a journal or and article can be very helpful. thank you all for your time and consideration.
I want to analyze the noise and hydrodynamic performance of the propeller with OpenFOAM, but there is no relevant information here, I will express my thanks if you can help me +.
I need two model heat exhanger between air and water. But air will be admitted in liquid state at negative temperature and on leaving the heat exchanger it should be in gaseous state.
In this problem two fluids are involved
Water
Air
Once again Air has enter in
Liquid state
On transferring heat from water it has to be converted to
Vapour.
I'm aware interphasechangefoam for phase change and CHTMultiregionfoam for two fluids. But in this case two fluids are involved. In this two fluid, one fluid has to undergo phase change.
Regards
Dr. Ijaz Fazil.
Hello! I am trying to simulate a centrifugal compressor using OpenFOAM, the in-built pressure based solvers like rhoSimpleFoam give very inconsistent results.Please if anyone has experience with this, it will be a great help.
Thank you
I have a question, is it that reactingfoam can not directly find out the ignition delay time and flame speed, but need to post-process the result. The literature I saw does not have the processing process, do you have any relevant references?
Hello everyone.
I am planning to start working with open source CFD codes (in Windows, in principle). I am thinking of #OpenFoam or #SU2.
Can anyone suggest which one is better (in terms of community support, easy to learn, capabilities, computational speed, features, etc.)?
Also, it is VERY important for me to know:
- The CPU/GPU benefits (some CFD codes do not support all options or graphic cards). Your experience in using them for cloud computing is also appreciated.
- The possibilities to connect it to Matlab/Python/etc to create scripts for automating optimisation and design processes.
Do you have any other CFD codes in mind?
Many thanks in advance!
I am using openfoam to calculate the flow field of a rectangular section channel with a cage in it and try to analysis the influence of the blockage on particles transport. I plan to inject particles in the cage, which means only part of flow field is what I exactly need, thus I used decomposePar to divide the cage into processor1 in order to reduce calculation time and after steady state I created a new case inwhich 0/,constant/ were from processor1, I got correct U,p... and polymesh, which all perfomed well in paraview. I redefined the boundaries by creatPatch. But when running the new case with particleFoam I always got an error "Not implemented...FOAM aborting". I think maybe BC causes this error but don't know how to fix it.
So how to fix this error or maybe there is more appropriate methods to achieve this?
My English is not very well, thank you for reading this and all your help!

So I usually use the COMSOL Multiphysics software to deal with hemodynamic problems with the CFD module of the software. i found OpenFoam as a opensource software but i don't have ideas about it.
is OpenFoam suitable for scientific reasearche in matter of medical field?
what are the major difference between Ansys Fluent, Comsol Multiphysics and OpenFoam?
are the results obtained with OpenFoam equivalent to thous obtained with the commercial software ?
thanks in advance
Hello all
I am simulating flow over a sphere at Re = 881 where Drag coefficient must be almost Cd=0.5. I simulate it using both using laminar and Turbulent models(KOmegaSST). for laminar simulation, I get Cd ~0.5 but fort the Turbulent simulation, first of all it takes very long tome to converge and even after convergence, it gives Cd~0.65(Actually it has not fully converged yet, see attached figure). Now I have two questions;
1- what happens if I use turbulent model to simulate laminar flow?
2- when should I expect convergence based on the attached figure?

I am thinking of ANSYS and COMSOL multiphysics.
Also considering the following list.
Commercial software
1) Simcenter STAR-CCM+
2) Battery design studio (BDS)
3)Thermal desktop
Open source software
1) OpenFOAM
2) SU2
3) Thermo-Calc
4) Cantera
Cloud-based software
1) SimScale
If you have experinces with any of the above. Please give your insights.
In openFOAM, there are multiple options for choose in LES, such as WALE model, Smagorinsky model and so on. Which one is suitable for dynamic mesh and why ?
I am a bigginner of LES simulation, as far as I know , the only difference between them is WALE model includes the rotation rate in the calculation of νsgs, and Smagorinsky not. What else should I take into account in simulation?
Hello.
I am using OpenFOAM ver 4.1 to calculate Cl and CD using forceCoefficients function Objects.
I know that in incompressible case, the OpenFOAM calculate p as P/rho.
I put the value rhoInf as 1 and 1.225. The OpenFOAM calculate same values.
And then, when I divide the calculated value as 1.225.
The modified value(calculated value/1.225) is reduced.
And it shows under 2% error with experiment result.
In my opinion, the forceCoefficient does not reflect entered value as rhoInf.
Here is my calculating setting controlDict file.
plz help me.
How can I reflect the density that I entered in the coefficient calculation?

Hello all
I have two questions;
1- First of all, is it possible to generate HIT inside a rectangle? If so, it is called HIT again?
2- if Nx=Nz but Ny is different, How can I calculate power spectrum?
when Nx=Ny=Nz, it is possible to use below openfoam algorithm;https://www.openfoam.com/documentation/guides/latest/api/energySpectrum_8C_source.html
but in my case Nx=Nz =/ Ny
Thanks,
Farzad
Hello to everyone,
currently, I am simulating a multi-physics and multi-regions problem in OpenFoam;
In my case, the boundary condition at the interface of the regions (coupled boundary condition) is a function of both physics. (i,e, Q= f(V,T); V=electric potential; T=temperature; Q=heat at the interface);
Apparently, it is needed to modify the source cod of the boundary conditions, since both electrical potential and temperature fields should be implemented for thermal boundary condition.
did any one have a similar experience? I will be really grateful if someone can help me with that.
Thanks.
I would like to get your opinion about which open source tool is more reliable for battery aging simulation and performance evaluation? There are various open source tools such as PyBaMM or OpenFOAM. I would like to get advice upon your experience.
Thank you in advance!
Imagine that you start a simulation where you need to compare different schemes, models and mesh for the same problem.
How would you organize the files and where would you compare the data?
For example, let's take an HVAC example where you need to change the flow rate to try different turbulence models and Mesh. Easily you could get something like:
HVAC - Mesh 1 - k-e
HVAC - Mesh 1 - k-w
HVAC - Mesh 2 - k-e
HVAC - Mesh 2 - k-w
Then let's say you want to show all the results together and easily compare how would you do it?
So far I just manually save PNG and compare in a table of pictures using word. How would you do it?
Thank you,
Hello!
I am looking to simulate a turbocharger centrifugal compressor for optimisation purposes, using OpenFOAM in the near future. I have not used this solver before as in my research I have used Ansys Fluent. However, I have read in some literature that this solver is used somewhere. Please if anyone has experience with this or have any recommendation or suggestion, it will be a great help.
Thank you
I was doing a research about how to import fluent Mesh file to Openfoam, but when the geometry is multiblocks, there are two internal faces between every two blocks that cannot be identified by Openfoam, they are just shown in my boundary file. I know there is a link about it:
But when I change it to face matching in fluent, the exported mesh file can not be converted to be used in openfoam.
I know this question should be solved by cyclicAMI, but I don't know how to use this utility, everybody get the similar situation and fixed the issue, please help me
Should I use openfoam for direct numerical simulation of compressible turbulence (decaying compressible isotropic turbulence)?
Hi Everyone,
Is it possible to calculate mean and prime2Mean values of U, P in OpenFOAM post-processing utility as I have already finished my simulations and forgot to include them as a function in controlDict ?
Thank you,
Jayanga T. Samarasinghe
I am really stuck and could use some help even if it is in form of collaboration.
I have mesh files generated by Matlab. I would like to covert them to a mesh file OpenFOAM accepts so I could run OpenFOAM for my problems. Thank you for your help.
I am trying to simulate bubble rising condition in a pipe using dam break tutorial file available in openFoam.
I am not an expert guy. Can anyone suggest me to do what steps should I take to complete it?
Let's consider a rectangular channel having a porous obstruction in between. I want to set up a case to simulate the changes in flow behaviour due to this obstruction using VOF (interFoam). What pressure and velocity boundary conditions should I consider on the interface of porous medium and fluid?
Hello everyone.
I have just installed OpenFoam software.
I don't have access to the default codes section, I do not know why?
Do I have to install another program to access them?
Regard
Narges
Has anyone tried modelling multiphase flow (interFoam solver) using LRR or SSG turbulence closure in OpenFOAM? I want to discuss about it.
Subhojit
I'm organizing a course in Italy. Contact me if interested.
Hi all,
I'm doing multiphase FSI coupling using OpenFOAM and an in-house solid solver, connected by a coupling library preCICE. I'm trying to study the interaction between a caisson breakwater and waves. The fluid domain is calculated using olaFlow and the mesh deformation is calculated by the solid solver.
After the caisson is hit by waves, it deformed and there was some overtopping water on the top on the caisson. Suddenly, the simulation crashed due to the divergency of fluid domain (OpenFOAM). I checked the log file and found after the overtopping water occured, the phase fraction(alpha.water) began to get larger than 1 and kept increasing till the simulation stopped. At first, I assumed the problem is caused by dynamic mesh which affected the calculation of phase fraction. So I increased the Young's modulus of the caisson to reduce its deformation. However, the simulation crashed as before.
Therefore, I wonder if the problem is caused by the instability of the phase fraction (or maybe the turbulence model?). Has anyone faced with this problem? Is there any method to stabilize phase fraction calculation in multiphase FSI coupling with dynamic mesh?
Any advice or suggestions will be appreciated! Thanks in advance!



I'm currently working in OpenFOAM as part of my research on two-phase viscoelastic flow. OpenFOAM version 9 supports viscoelastic flow models such as Maxwell, giesekus and PTT, listed under momentum transport models(Laminar). I don't know how to implement these models in the case file. If some case files of benchmark problems related to these(Twophase Visco elastic flow) exist, could someone guide me through those?
Does any one have some experience with creating 3D geometries with FreeCAD and subsequently editing it to the OpenFOAM CFD software? Could you share any tutorial or demo links with me?
I am actually facing a problem with "rhoInf". What will be the exact value in the situation given below in much needed to know otherwise while running the solver It shows "fatal error".
Can someone help to correct the mistake?
Thanks in advance


Hello!
How to plot Time averaged fields in a determined direction, for example in radial or axial direction in paraview with OpenFoam code?
Thanks !
Is spoken tutorial IIT Bombay good to learn OpenFOAM
Dear all
I intend to model the fluid flow through porous media using coupled DEM-CFD (LBM). It is mainly about the 3D behavior and interactions of soil grains in the presence of interstitial water flow. Soil particles are non-spherical, and they are assumed to be potentially detachable (not fixed); thus, fluid boundaries are deformable. I do not have any experience with any of these software tools, and I'm not sure which one I should use. Ease of use, performance, and the ability to model non-spherical particles are considered as the most important factors.
I suppose that OpenFOAM can be coupled with LIGGGHTS and solve DEM-CFD problems. There is also the CFDEM which does the same, and of course, there is an LBM flow engine implemented in YADE. Which one do you recommend?
I would like to start a discussion of this specific topic.
Here I would like to discuss the list of possible techniques helpful for performing the simulation of oscillating bodies in quiescent fluid.
This discussion is open to all the students, teachers, and researchers.
I request you to reply here if you are familiar with code development in OpenFoam, IBPM, NEEK1000, lilypad and CFX
Hi,
i am working on airfoil optimization, my optimization algorighms are in python and i want to use openfoam as my flow solver but i can not find a way to couple python and openfoam to run the optikization case, can anyone help me in this regard?
I have a structured vtk file. I would like to convert this to OpenFOAM format in the quickest possible manner. There is a vtkToFoam code library - that is available - however, that is only for unstructured VTK data.
Dear network,
I'm aiming to simulate a tracer pulse injection, I'm seeking if such boundary condition is already built into OpenFOAM or one needs to code it on his own.
Hi all,
The case I want to simulate includes a porous media baffle, with water on the left side and no water on the right. I want to simulate the process that water on the left flows into the porous media and then flows into the right side.
In my simulatioin, the seepage velocity (from the soil to the fluid domain) at the interface is calculated by solid part. Then, there should be more water at the interface in fluid domain. I’ve managed to couple the seepage velocity at the interface in OF, but how could I add the water due to the seepage according to the velocity at the interface? Could anyone please give me any hints?
How to sample pressure and temperature on a oscillating cylinder in using OpenFOAM using sample Dict utility or any other method
Hello,
I'm about to start a project about designing an optimal heating algorithm for outdoor pools and hot tubs. The algorithm we are aiming for should take into consideration not only the current water and air temperature, relative humidity, pool surface and volume but also the predicted temperature in the next 24h in order to minimize the necessary heating needed to attain and keep a given water temperature (ex: 27 deg) in a certain time (like in 6h when people will bathe at 13h00).
I would be looking for the following two kind of advice:
1) Papers or reports about predictive control design methodology on energy efficiency
What appears different with our project is the fact that the required heating will be influenced by much later acquired solar heat during the day. How best to take such long term effect into account?
2) Tutorials and first hand experience with OpenFoam or TRNSYS on this kind of modeling problem:
I have a strong mathematical and programming background but no experience with either software or FEM/CFD. Any suggestion about which tool might be easier to model and experiment with for this problem?
Regards,
Bruno
Hi!
I am using solar load model in openfoam, with simpleSolarCar as my base case. I have used only solar load model and not applied any other radiation model like view factor or fvDOM with it. I want to know which model openFOAM has implemented in solar Load. Is it solar ray tracing? and if we apply solar load along with fvDOM, does it implement solar discrete ordinate model?
Please guide.
Thanks
Hi, I am new to OpenFOAM and made a 'sub' folder under tutorials/multiphase/interPhaseChangeFoam using the 'cavitatingBullet' case and moved an ASCII .msh file to it from Fluent. When I am trying to convert the mesh to OpenFOAM using the 'fluentMeshToFoam filename.msh' command, it is showing a FOAM FATAL ERROR (cannot find file "/home/divyajyoti/OpenFOAM/OpenFOAM-v2012/tutorials/multiphase/interPhaseChangeFoam/sub/system/controlDict"). I am stuck with it for several days and unable to find a way out from it. I would dearly appreciate any help with this. I am attaching a screenshot of the terminal window. Regards!

Hello,
I am trying to use snappyHexMesh to generate the volume mesh from stl files. I think I tried almost all kinds of snapping settings but I cannot eliminate some triangular cells shooting in or out of the surface at the edge of the geometry. Having those bad cells prevent a proper layer addition to that part of the geometry so my boundary mesh is not completely covering.
I'm putting an example for the bad cells.
Does anybody have any idea which parameter(s) to change to avoid that behavior?

How to simulate the continuous emission of pollutants from chimneys in OpenFOAM ?
The exhaust from the chimney includes air and pollutant particles.
Thanks !
I would like to know is there any solver for Discontinuous Galerkin method in 3D in OpenFoam of Foam Extend except HopeFoam?
Thanks a lot.
There are different versions of OpenFOAM. I want to know which version is more suitable for LES.
Hi,
I'm trying to model a shock tube which consists of the driver and driven area. The driver and driven area contains helium at high pressure and nitrogen at low pressure respectively. They are separated by a diaphragm, which will rupture at t=0. This is a high speed flow problem with speed reaching 4-5 mach no.
So which solver should I use? I was previously using rhoCentralFoam but can I make it work with 2 gases, assuming no reaction at the moment?
I read thru the forum and some suggested rhoReactingFoam or rhoPimpleFoam.
cfdvenkatesh in the Cfd-online forum suggested :
"You could use Species Transport model to simulate mixing of 2 different gases. If your application is not IC engine related, I would suggest to use General Species Transport.
In the inlets you can specify the mass fractions for the gases you like."
So which is the more appropriate solver to use?
Thanks!
We adopted the famous open source CFD code, openFoam, and the finite element software code_aster in some applications of cardiovascular biomechanics, but havn't using them together to solve fluid-structure interations problems in this field. So we wonder whether they can be used together for solving FSI problem? and if yes, how?
Hello everyone,
In the process of creating a real-gas flamelet in CANTERA, I came to know about two open-source packages through the CFD Forum.
1. opensmoke++ suite
Has anyone used this package before? Is it a real-gas capable?
2. CoolFOAM: The CoolProp wrapper for OpenFOAM
Has anyone used this package before? Is it a real-gas capable for generating flameLets?
Thank you !!
Hi everyone,
I've some issues with meshes in OpenFOAM. I have three different domains in STL format and each one has meshed with cfMesh utility. The issue resides when I try welding the different meshes. After of used the mergeMesh utility, I used the stitchMesh command but it does not work.
I have had switching the pointMergeTol (as recommended in CFD forum) in toleranceDict file and used integral or partial flags but the persistent errors are bad points, duplicate points, or simply core dumped.
I utilized the mergeMesh to build the entire geometry and stitchMesh to manually delete the duplicate faces (internal faces).
My goal is to use the topoSetDict file and create the faceZones and three cellZones (one cellzone for each stl file) as requiere my case. The solver to apply is buoyantBoussinesqSimpleFoam
Is there another way to do it?
What am I doing wrong?
Regards,
Hello,
I want to convert *.msh OR *.cas file of Ansys fluent 2021R2 to OpenFOAM. I am using workbench 2021 R2.
I have used this conversion before with older Ansys versions by simply using *.msh OR *.cas file to OpenFOAM using 'fluent3DMeshToFoam' command.
I really appreciate any suggestion/help on this issue!
BR,
Gitesh
Hello dear RG community.
I ran a transient case in OpenFOAM. I got a lot of subfolders for each time step. Then I type paraFoam and it loads all the time steps. It takes about 20 minutes to load them all.
For that reason, I want to try loading only one time step. And I don't know how to do that.
I'm wondering if any body can help me to load only one time step please.
Thank you in advance.
Ivan
Does the website describing physical devices and experimental techniques exist:
in one subsection, within one direction, realizations of physical devices are collected;
in style - something similar to github, so that you can make changes;
not only articles, book shapters, but links to models in Ansys, Comsol, OpenFoam, etc;
presents digital twin of real home-made and industrial production physical devices (preferably not made in proprietary software);
examples from various fields of physics are given, i.e. modern rethinking of the book Technische kunstgriffe bei physikalischen untersuchungen / E. V. Angerer?
I am a beginner in simulations. I want to simulate the current density in a fiber-reinforced polymer foam. However, I don't have access to COMSOL Multiphysics. Is there a free alternative to it that works well enough?
Hi everybody
I want to calculate the stream function on a slice of a 3D geometry in OpenFOAM. However, when I create the slice, I cannot save it as a 2D OpenFOAM file to known as a 2D case with "empty" boundary condition in front and back boundaries.
Do you know how can I do that?
Thanks
Hello everybody
I want to sample the data on the red line along the curve duct.
In fact, I want to have the average velocity on the red line along the curve duct.
Do you know how I can do that?
Thanks

I want to solve the flow in the region showed in the attached Fig. using Ansys, Comsol, or OpenFoam. The problem consists of solid body conducting heat between rarefied region and normal flow region. The boundaries subjected to heat flux, temperature, and insulated wall. The problem is time dependent. Thanks for any reply.

Hello All,
I have a small issue which i cannot solve. I am trying to apply to the inlet boundary condition of a pipe a velocity, k and omega 2D profiles in OpenFoam v2012. I have tried to use fixedProfile, mapFieldsDict but i cannot figured out how to do this.
I will be very thankful if somebody who have more experience can explain or to provide some examples or maybe some documentation which is not so easy to find on the internet!
P.S. I have used fixedProfile before for a 2D simulation and it worked, but for a 3D maybe i am doing something wrong.
Thank you very much!
Dmytro
Hello to all,
I have faced to some problem when I was trying to model and mesh a specific domain. In this model two faces of two different blocks must be merged. I would be grateful if anybody would help solving the problems explained in the link "https://stackoverflow.com/questions/68561182/problem-to-merge-faces-of-some-defined-blocks-in-openfoam-using-blockmesh" and let me know if there is a comprehensive training file about that.
I need to determine the density of various oxide solid solution phases (e.g. spinel, silicates, pseudobrookite, etc.) as a function of composition and temperature. I want to use this information in OpenFOAM multiphysics models.
Does anyone perhaps have a reliable set of data, or an empirical relationship that I could use?
Thanks for the help.
Johan
Hi, I hope you can help me
I have to make a 3D simulation of the effect of the Lorentz force on the flow of an electro-conductive fluid.
Basically the idea is to be able to see how the flow lines go around the point where this force is applied.
I understand that Ansys and OpenFOAM has a module dedicated to MHD, but honestly I have never used it and I have not found much information on the internet.
Could you help/guide me to be able to perform this simulation?
Hi every one,
I am using now Comsol and Fluent, Could you suggest a software for free, which is friendly and easy to use. OpenFoam is too complicated.
FLOW 3D is a one-phase numerical model with empirical equations for bedload transport, but OpenFOAM is a physics-based code.
Dear Foamers
I have a 2D case of a reciprocating engine simulation, and the mesh is of moving type and the area of cylinder keeps changing. Since the cylinder geometry is complex, and for further thermodynamic evaluations, area enclosed in the cylinder walls and piston is required. I wanted to know if there is anyway to extract this value by any openFoam utility? or any function to find the area which has to be implemented in controlDict for real-time area calculations?
Hello, I went through the Fluent Theory Guide and other Ansys learning resources, however I couldn't find the answers to the following issues.
Let's discuss the problem on the example of a general steady RANS k-omega case.
No slip Wall
U is set to zero, k is set to zero, omega is given by a specific equation.
1. What about pressure? Does Fluent use the zeroGradient condition for pressure on a wall? It's done by default in OpenFOAM.
2. NS momentum equations are 2nd order in space, so the boundary conditions should involve the normal derivative (e.g. dUn/dn=0), if I am not mistaken ?
3. Consequently, the turbulence transport equations are 2nd order in space as well, so should their respective derivatives be specified on a wall?
Velocity Inlet
U, k and omega are specified.
4. What about pressure? zeroGradient?
5. Refering to question 2,3 - should a Neumann BC be specified for U, k, omega?
Pressure outlet
Fluent Theory guide says that all variables (apart from pressure) are extrapolated from the interior. However, that does not sound right. Imagine a highly diffusive system, wherein turbulence (or any other scalar) is diffused upstream, faster than the downstream convection. In such a case, turbulence properties at the outlet would affect the solution in the domain.
6. As a consequence, what BC are imposed for U, k, omega? Mentzer suggests "intervals" which freestream turbulence properties should be taken from. https://turbmodels.larc.nasa.gov/sst.html
Symmetry
Fluent specifies zero convective/diffusive flux across the symmetry plane.
7. We should specify a value of k and omega at the symmetry anyway... right? It has to be done in OpenFOAM...
Thank you very much for your time and effort, feel free to make a comment on that.
Dear All,
I have created a stl mesh using open3D from point cloud. This mesh was split into two domains as a patch using Paraview Python and then added back using "surfaceAdd". Now, this mesh is implemented into snappyHexMeshDict of OpenFoam solver.
I mesh is running well. But, when I do splitMeshRegion after some topoSet addition, it creates multiple domains, where my cellZoneRegion has only two regions and I need only these two regions.
The splitMeshRegion creates an extra domian which needs to be eliminated or added to the major region. How to do that? I have attached an image where the red color represents the extra domian created. It has only 3 face.
I am running chtMultiRegionSimpleFoam, so needed regions for simulation.
Below is the snippet of splitMeshRegion.
Region Zone Name
------ ---- ----
0 1 gland
1 0 tumor
2 -1 domain2
Sizes of interfaces between regions:
Interface Region Region Faces
--------- ------ ------ -----
0 0 1 278
1 0 2 3

Hello. I'm trying to simulate droplet impact onto liquid films, and I'm currently using interFoam with dynamic mesh on the volume fraction scalar function only to refine the interface between the gas and the liquid phases. Is it possible to implement more than one dynamic refinement on the scalar/vector fields? For example, if I want to topologically refine the mesh based on the volume fraction and the velocity magnitude, are there any functions or possibilities that allow for that implementation?
Dear all,
I am using OpenFoam 5.0 and working on heat transfer simulation using chtMultiRegionSimpleFoam solver.
1. I have a temperature data file which equals to the face center length of a surface region. This temp file has "0" temp in some faces and rest with variable temperature.
(say out of 1000 temp values, 400 are 0s and rest are varying). This is a Dirichet BC.
2. I have used this temperature data and simulated it.
But now, I need this "zero" temperature value to be changed to convection BC. I know the parameters for convection BC. The convection parameters are as given below.
type externalWallHeatFluxTemperature;
mode coefficient;
Ta constant 22;
h uniform 10;
kappaMethod solidThermo;
value uniform 30;
But, how do I change the zero temperature cells to different boundary condition? Or, how can I create a Patch based on this temp=0 faceCentre cells?
3. I checked with SetFields (FieldToCell), but I can only give scalar value there and not BC.
I have attached two images of the images, one from top and isolated view. The blue color shows the 0 temperature where BC need to be changed.
I hope the question is well understood. Any leads will be appreciated.
Regards,
Sunag R A.


I have a problem regarding the WSS conversion from OpenFOAM to Fluent. Actually, I can obtain WSS results in OpenFOAM but when I convert the results to Fluent, then WSS values are seen to be zero, although they are not (I write "wallShearStress 19" in foamToFluentDict file). I don't know how to resolve that issue, could you please help me if you have any idea?
P.S. I also tried to convert the data to Tecplot format, and WSS values are again become zero.
Dear All,
I need to create a faceSet from topoSet or any other. From this, I will further create a patch using createPatch and work with simulation.
To create faceSet, I have data related to faces and faceCentres. I have points too, I know I can use pointToFace and then create faceSet. But, I do not want to use points for creating faceSet.
So, How to create faceSet using only faces and faceCentre data?
faces example:
4
(
5(0 1 2 3 4)
4(5 6 7 8)
4(9 10 11 12)
4(13 14 15 16)
)
faceCentres example:
4
(
(0.1430288 0.00218509 0.0001205211)
(0.1905574 0.005802098 0.0004476021)
(0.1940142 0.007457328 0.0002026334)
(0.1986899 0.01370724 0.0003252593)
)
Any leads will be appreciated.
Regards,
Sunag R A.
I have tried to plot face normals by OpenFOAM compiled paraFoam, but I couldn't. It is possible to plot boundary mesh faces (which are on top, bottom, inner and outer cylinder walls) by Glyph normals, but not the internal mesh faces.
Is there any function code or way to plot them inside paraFoam?
Dear all,
I recently saw your article on "A CFD MODELING APPROACH FOR A CONTAMINANT RELEASED IN A CITY". I'm working on pollutant dispersion for NOx, SO2, Pm via openfoam.
Can I know how you model your pollutant tracer in openfoam?
Which foam did you use?
Hello all. I would like to simulate a nano-fluid. Copper and aqueous medium. In the shape of a cube of still water, it has a magnetic flux on the sides and other sides, a temperature difference. The question is, how do I optimize this nanofluid to be affected by the magnet? What is the property that I add to the fluid In The Science of Analysis Property materials within the software environment ?
Dear All,
I have an stl file which is constructed from 3D point cloud data using Open3D python library. The stl file consists of a surface and a base integrated together in a single stl. (For reference, I have attached the ascii stl file and also the image).
1. I need this stl file to be split into two files. One for the surface and one for the base using python. This is because, I need to give two Boundary conditions (Base and surface) further using OpenFoam software. How do I achieve that?
2. My idea was to sort the stl file in terms of base mesh and surface mesh and then create two lists of stl and save as two stls. But I am finding it difficult to achieve. I tried to use numpy-stl.
3. The base stl file looks like a planar shape, but has some minute elevations to it for which I can give the range of the coordinate.
Any leads will be appreciated.


Dear All,
I have a set of 3D datapoints that looks similar to sphere. I converted this to stl format by using "MeshLab" software. I think the mesh is good to go with triangulated faces on the surface.
Now, I want this domain for internal heat flow transfer. For this purpose, I want to construct 3D mesh from BlockMesh and SnappyHexMesh. But when I gave the domain for blockmesh and executed snappyHexmesh, the blockmesh is not craving in the shape of the stl file, instead the block is also produced.
1. I have given the "locationInMesh" inside the stl file in snappyHexMesh.
2. The domain of the blockmesh is exactly the boundaries of the stl file. (xmax - 210, ymax = 165, zmax = 86.4).
3. I have attached the images and also the case file for reference.
4. All I want is only the stl file with 3D mesh for simulation.
I have attached two images for reference. One obtained from the meshlab and other from OpenFoam which is obtained after moving meshlab mesh to SnappyHexMesh. I have also attached the case for reference.
Case Attachment: https://drive.google.com/file/d/1MaT...ew?usp=sharing
Any leads will be appreciated.
Regards,
Sunag R A.


Hi,
I would like to know why openfoam uses a scaling factor of 0.5 to calculate Co number.
Co = U * dt/ dx.(1) {normal form}
Co = (0.5 * phi * dt)/V_cell.(2) {OF manipulated form of (1)} OF considers surface sum of fluxes along all faces of cell and divides it by cell volume. We are multiplying and dividing (1) with surface area of cell. This is the way it is also specified in Henrik's thesis as well without a scaling of 0.5. Any idea?
We need to calculate multiphase stream of the one substance in the air atmosphere (this is why we using interFoam), but also we need to get heat transfer data between the substance, solid obstacle (moving reference frame) and atmosphere.
OpenFOAM is a great open-source CFD code offering impressive accuracy and robustness for free, however, for CFD users who are interested to switch from expensive commercial software like CFX, Fluent, Comsol, etc, it has a steep learning curve, and also it is time-consuming for large projects. To bypass this limitation, Simscale and Simflow have developed graphical user interfaces with OpenFOAM CFD code at its core, but you have to pay a license fee. I am interested to know if there is any open-source graphical user interface for OpenFOAM.
I'm using OpenFOAM to run a CFD study of thermal comfort within a hall. I'm using OpenFOAM v1912 and BouyantBoussinesq(Simple&Pimple)Foam solver. eI have 6 inlets and outlets each with specific flow rates. I specified the flow rates accordingly at the inlet using flowrateinletvelocity BC and at the outlet using flowrateouletvelocity BC. Based on the height, I computed (p-rgh)/rho and fixed it at one of the outlets.
My mesh quality is good (Non-Orthogonality less than 50). The dimension of my hall is 30m *30m *4.5m. It was okay so far when I was doing the simulation for small halls, but I'm facing this problem at the moment.
This happens each time I start the simulation, at the beginning of iterations, p rgh iteration (1st step) reaches 1000 or 2000. The final residual is very high (greater than zero). After the cumulative value (continuity error) begins to rise and becomes greater than 1. The value of Pressure ranges from 1e18 to -1e18 (Two extreme values) even after after 1 or 2 time steps, then the simulation blows off.
I have tried the following options
1)potentialFoam initialization
2)Mesh quality check
3)Defining pressure at all the outlets
4)Using prefcell and prefpoint in fvsolutions to define the pressure in fvsolutions.(if I use this I get continuity error at the start of simulation)
5)Both steady state and transient analysis
6) keeping URF very low and also reltor for pressure to 0.0 in fvsolutions
7)first order and 2nd order fvschemes
7)nNonOrthogonal correction raised to 20.
8) I have turned off turbulence.
9)simplifying the geometry.
