Science topic

OpenFOAM - Science topic

Explore the latest questions and answers in OpenFOAM, and find OpenFOAM experts.
Questions related to OpenFOAM
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
Mehran Sharifi, thank you for your response. I’ve already tried many of the points you mentioned. I believe the problem comes from the geometry itself. I tried using createBaffles for the internal elements, but I realized that this method creates two faces of my elements rather than a solid element inside. In OpenFOAM, it’s quite rare to do that (i.e., create volumes with boundaries inside a room), which is why I was struggling to find a solution.
However, I switched to an empty room at the beginning by changing from OpenFOAM 12 to ESI OpenFOAM, where I can choose specific solvers (in my case, I used buoyantSimpleFoam). In this scenario, the simulation is running well with no bounding values.
That said, I still don’t have a solution for creating internal boundary volumes in OpenFOAM. If you have any ideas, I’d be happy to receive a few hints! 😄
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Answer
Thanks Douglas! Currently only numerical effort, as looking to run extensive parameter optimisations of the geometry (shield). We're following a 'minimal viable product' approach (blended with scientific validation). We're looking for sufficiency, not cutting-edge (in other words).
I've tried in an amateur fashion to visualise 'theatre smoke' while talking but I don't think I can capture the dominant motion, but as I haven't done experiment methods before I'm guessing I'm missing something.
Depending on whether I can get collaborators will dictate the the strategy. We're very underfunded and could probably spend that money in more effective ways than proving the science (unfortunately).
  • asked a question related to OpenFOAM
Question
1 answer
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) ?
Relevant answer
Answer
Hi Marios
It depends on the boundary condition you use at the walls for k and omega. If you use the wall function for k and omega, OpenFOAM models as high Re formulation, whereas if you use fixed value of turbulence kinetic energy as zero, then OpenFOAM models as low Re formulation. You can refer to wolfdynamics documents related to turbulence modeling to get more understanding on this topic.
I hope this information helps you.
Thanks
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Answer
Hi Ben Wu
Easier or better? ANSYS Fluent is by far better than Flow3D for general use. However, it is more complicated and requires more time to learn.
  • asked a question related to OpenFOAM
Question
8 answers
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?
Relevant answer
Answer
Thanks Balaji Mohan! Wondering why don't you modify off-the-shelf ML from Google, FaceBook, etc, to cut development times?
Is Coverge CFD 'black-box', or can you see the code? Can you still have a functional solver if the company deoesn't like what your doing and pulls the license? I'm definitely an open-source advocate, based on equity reasons.
  • asked a question related to OpenFOAM
Question
1 answer
Hi everyone, is there a easy way for OpenFOAM to calculate the grid resolution (delta x+, delta y+, and delta z+)?
Relevant answer
Answer
What you are referring is defined as Y_plus defined as y+=(rho*y/mu)*u_tau
  • asked a question related to OpenFOAM
Question
2 answers
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!
Relevant answer
Answer
Python is best
  • asked a question related to OpenFOAM
Question
5 answers
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
Relevant answer
Answer
I am interested in your question but it needs a lot more explanation. Let me explain what I'm wondering about that I'd need to know to think about your question: If you are solving a F(u)=b, the residual is
Residual = b-F(u_approximate).
This is a vector with a lot of components so plots are usually some sort of aggregate statistic.
So what is your system?? Sometimes, people solve F(u)=b by time stepping: (u_n+1 - u_n)/k + F(u_n)=b then the residual means the discrete time derivative. Sometimes codes are written to be very memory efficient so they calculate something they call a residual that is just some easy to get data that serves as an optimistic proxy.
  • asked a question related to OpenFOAM
Question
3 answers
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'??
Relevant answer
Answer
Maojin Gong This AI response is not false as it could be sufficient for a reader Lamda. However, it is not scientifically accurate as we are on a research thread. Furthermore, it does not display the mentioned references...
  • asked a question related to OpenFOAM
Question
3 answers
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.
Relevant answer
Answer
If you have a constant, uniform, fixed shear stress field, OpenFOAM does have a "fixedShearStress" boundary which takes as input the vector value of \tau (assuming its constant over the entire boundary).
If you have anything more complicated (like a non-uniform shear stress field), you will unfortunately have to get your hands dirty coding a custom boundary condition. The easiest way would be to make a copy and modify the existing fixedShearStress boundary in OF. It imposes a Dirichlet boundary based on the velocity normal gradient field (from tau) and the cell-centred values of the velocity field from cells neighbouring the boundary. If you do follow this approach, it is important to just make sure you cancel out any velocity in the boundary normal direction, to make sure you don't accidentally, while converging, introduce inlet or outlet flow across the boundary.
Regards
  • asked a question related to OpenFOAM
Question
1 answer
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?
Relevant answer
Answer
<patchName>
{
type fanPressure;
file "fanCurve";
outOfBounds clamp;
direction in; // in | out
p0 uniform 0;
value uniform 0;
// Optional entries
U U;
phi phi;
}
  • asked a question related to OpenFOAM
Question
2 answers
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.
Relevant answer
Answer
CFD softwares are based on numerical methods or techniques to predict the fluid behavior for various conditions e.g. LES and RANS turbulence modelling etc. Unlike exact solutions , the numerical methods involve approximations of the governing fluid parameters which cannot be evaluated at once and thus need iterative computational solvers.
During this process several types of errors are introduced while approximating variable property e.g round off errors ( machine precision) , truncation errors depending on the type of numerical scheme used.
However , according to the nature of fluid and it's interaction with surrounding environment , ( in your e.g yplus wall function which is measure of the fluid friction resistance near wall ) the solutions obtained through numerical schemes present a significant source of error which can interpret the fluid behavior in entirely different manner.
Therefore, the solution is often tested by repeating the process using better approximations and schemes with a focus to obtain the exactness of parameter value leading to iterations.
During iteration process , the error can amplify or reduce ( which is indicative of the stability of solution ) depending on boundary conditions used to obtain solution. So, often an error tolerance is introduced as condition in numerical algorithm to make the solution more meaningful and realistic which closely approximates the fluid behavior. In your case wall shear stress is being approximated using wall units in logarithmic boundary layer.
Once that condition is satisfied, the process stops and proceeds further by evaluating the next dependent variable and so on until complete solution is obtained.
  • asked a question related to OpenFOAM
Question
6 answers
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.
Relevant answer
Answer
If you go with Amazon Kindle, there is an option to publish one chapter at a time called Kindle Vella. The details are at the top of the page after you log in. It's intended for fiction but would work for other subjects. I have published 81 books on Amazon (62 of my own + 19 for friends and family). It's a good option.
  • asked a question related to OpenFOAM
Question
3 answers
Keywords: OpenFOAM, topoSetDict, createPatchDict
Relevant answer
Answer
Hello Sayar and Balachandran Nair,
I am trying to make this geometry. Circular inlet in a rectangular boundary wall.
How can I do it? Is it difficult with OpenFOAM?
Thanks.
  • asked a question related to OpenFOAM
Question
2 answers
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)
Relevant answer
Answer
To me your results make perfect sense. Firstly, the thickness of the velocity boundary layer is dictated by the thermal boundary layer (buoyancy depends on density differences caused by the varying temperature). Increasing Pr, e.g. by decreasing the thermal diffusivity will lead to a thinner thermal boundary layer, hence also a thinner velocity boundary layer. Given that the buoyancy forces are the same (temp.difference is constant), the thinner velocity boundary layer yields higher shear stresses and as a consequence a lower maximum velocity. Increasing Pr by increasing viscosity would also reduce the max fluid velocity simply because of the increased viscosity.
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Answer
Many hyporheic zone related studies have modelled this. The river-groundwater interface is treated as a pressure boundary.
  • asked a question related to OpenFOAM
Question
1 answer
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.
Relevant answer
Answer
Hi Bidesh,
I recently ran into a similar error when I use fe4.1 to solve a multi-mesh region case and I am wondering how you solved this problem? What is the cause?
Best,
Young
  • asked a question related to OpenFOAM
Question
2 answers
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.
Relevant answer
Answer
Without the full details of your flow problem and numerical method is not possible to answer.
  • asked a question related to OpenFOAM
Question
3 answers
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)
Relevant answer
What is the min and max alpha level you have set? Also, have you checked if the unrefinelevel and maxrefinelevels are set properly? Generally, changing the domain size should not affect the AMR.
  • asked a question related to OpenFOAM
Question
4 answers
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?
Relevant answer
Answer
Dear Gonzalo,
can you perhaps share your OpenFOAM case to have a look?
Thanks!
  • asked a question related to OpenFOAM
Question
1 answer
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.
Relevant answer
Answer
Both open-source software like OpenFOAM and commercial software like Abaqus are capable of simulating a wide range of multiphysics problems, including phase change, two-phase flow, mechanical stress, and microstructures. However, the choice between these two software packages can depend on several factors, including your specific research needs, budget constraints, and familiarity with the software.
Here are some considerations for each software package:
1. OpenFOAM:
  • Open Source: OpenFOAM is an open-source CFD (Computational Fluid Dynamics) software with a large and active user community. It's free to use and modify, which can be advantageous for researchers with limited budgets.
  • Customizability: OpenFOAM is highly customizable, allowing users to implement their own models and solvers. This can be beneficial for researchers who need to develop specialized models.
  • Multiphysics Capabilities: OpenFOAM has a wide range of solvers and libraries that can handle multiphysics simulations, including phase change, two-phase flow, and fluid-structure interaction (FSI).
2. Abaqus:
  • Commercial Software: Abaqus is a commercial finite element analysis software developed by Dassault Systèmes. It comes with comprehensive support and documentation but requires a paid license, which can be expensive.
  • Multiphysics Integration: Abaqus offers robust multiphysics capabilities, including thermal-mechanical coupling, fluid-structure interaction, and phase change. It integrates seamlessly with other Dassault Systèmes products like Simulia for a broader range of simulations.
  • User-Friendly Interface: Abaqus provides a user-friendly graphical interface (Abaqus/CAE) that can make it more accessible for users who may not have extensive programming experience.
  • High-Performance Computing: Abaqus is known for its scalability and high-performance computing capabilities, making it suitable for large and complex simulations.
To find a comparative study or article that directly compares OpenFOAM and Abaqus for your specific research needs, you can perform a literature search on academic databases like IEEE Xplore, ScienceDirect, or Google Scholar. Use keywords related to the multiphysics aspects you're interested in, such as "phase change simulation," "two-phase flow modeling," "mechanical stress analysis," and "microstructure simulation," combined with "OpenFOAM" and "Abaqus."
Keep in mind that the choice between these two software packages should also consider your familiarity with the software, the availability of technical support, and your institution's resources. Additionally, you may find that for certain research projects, a combination of both software tools may be beneficial, leveraging the strengths of each for specific aspects of your simulations.
  • asked a question related to OpenFOAM
Question
2 answers
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 +.
Relevant answer
Answer
You can use libAcoustics libary for noise prediction in OpenFOAM
  • asked a question related to OpenFOAM
Question
12 answers
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.
Relevant answer
Answer
Hi,
I guess you could chose one of the two fluid inter solvers. They are based on Volume of Fluid and easy to apply. But you should really take care about cell resolution for good results of course. To take account for natural convection just apply boussinesq or polynomial thermophysicalProps. For polynomials you need to fit function coefficients according to your const. Pressure and temperature range. Unfortunately it can happen, that property calculation is not that precise.
On the other hand it is possible to chose euler solvers instead of inter solvers of course. But in my opinion you need really deep knowledge about all those empirical coefficients.
Hope that helps.
Regards David
  • asked a question related to OpenFOAM
Question
1 answer
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
  • asked a question related to OpenFOAM
Question
3 answers
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?
Relevant answer
Answer
Hi Bowen Li
can you draw a schematic from problem for me?
Is your software Fluent?
  • asked a question related to OpenFOAM
Question
6 answers
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!
Relevant answer
Answer
Both OpenFOAM and SU2 are popular open-source CFD codes with active communities and extensive capabilities. However, the choice between them depends on your specific requirements and preferences. Here's some information to help you make a decision:
  1. Community Support: Both OpenFOAM and SU2 have active and supportive communities. OpenFOAM has a larger user base and a longer history, which means there are more online resources, tutorials, and forums available. SU2 also has a growing community and provides good support through its forums and documentation.
  2. Ease of Learning: OpenFOAM has a steeper learning curve compared to SU2, mainly because of its extensive set of solvers and libraries. OpenFOAM uses a flexible and powerful C++ library structure, which requires some programming knowledge. SU2, on the other hand, has a more user-friendly interface and provides a Python wrapper, making it easier for beginners to get started.
  3. Computational Speed: Both OpenFOAM and SU2 are highly capable in terms of computational speed. However, the performance may vary depending on the specific problem, mesh, and solver used. It is recommended to benchmark both codes on your specific simulations to determine which performs better for your case.
  4. CPU/GPU Benefits: OpenFOAM supports parallel computing and can be efficiently run on multi-core CPUs. It also has GPU acceleration capabilities through the OpenFOAM+GPU extension. SU2 is designed to take advantage of multi-core CPUs, and it also supports GPU acceleration using CUDA. You need to check the specific GPU requirements and compatibility for each code.
  5. Integration with Matlab/Python: Both OpenFOAM and SU2 can be connected to external tools like Matlab and Python. OpenFOAM provides a set of pre-processing and post-processing utilities, and it can be coupled with Matlab or Python using custom scripts. SU2 has a Python interface (PySU2) that allows you to control the code and automate simulations using Python scripts.
In addition to OpenFOAM and SU2, there are other open-source CFD codes you can consider, such as:
  1. Code_Saturne: A general-purpose CFD code developed by EDF R&D. It offers capabilities for incompressible and compressible flows, turbulence modeling, multiphase flows, and heat transfer.
  2. Gerris Flow Solver: An open-source code specifically designed for free surface and multiphase flows. It uses the level-set method and can simulate complex fluid dynamics problems.
  3. Palabos: A lattice Boltzmann method (LBM) code that provides a framework for simulating fluid flows. It is well-suited for simulating complex and multiphase flows.
  4. FEniCS: A flexible and user-friendly computational toolkit for solving partial differential equations (PDEs). It is not specifically focused on CFD, but it can be used to solve fluid flow problems.
Remember to thoroughly evaluate the features, documentation, and support for each code to determine which one best suits your specific needs and goals.
  • asked a question related to OpenFOAM
Question
2 answers
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!
Relevant answer
Answer
To extract a specific part of the flow field in OpenFOAM and start a new project on it, you can follow these general steps:
1. Identify the region of interest: Determine the specific part of the flow field that you want to extract for your new project. This could be a particular geometry, a region within the domain, or a specific time frame of the simulation.
2. Define the extraction criteria: Specify the criteria for extracting the desired part of the flow field. This can include conditions based on geometric boundaries, cell labels, time steps, or any other relevant parameters.
3. Use the appropriate OpenFOAM tools: OpenFOAM provides several utilities and functions that can help with extracting and manipulating the flow field. Some commonly used tools include:
- `patchAverage`: This utility can be used to extract averaged values on a specified patch or surface.
- `foamToVTK`: This utility converts OpenFOAM data to VTK format, which is widely supported by visualization tools.
- `sample`: The `sample` utility allows you to sample the flow field at specific locations and save the data in a new file.
- `fieldMinMax`: This utility can be used to find the minimum and maximum values of a field within a specific region.
4. Write custom code or scripts (if needed): Depending on your specific requirements, you may need to write custom code or scripts to perform more complex extraction tasks. OpenFOAM provides a comprehensive C++ library for customization and development.
5. Start a new project: Once you have extracted the desired part of the flow field, you can start a new project based on it. This may involve setting up a new case directory, adjusting boundary conditions, mesh refinement, or any other necessary modifications for your new simulation.
6. Perform analysis or simulation: With the extracted flow field and the new project setup, you can now perform your desired analysis, post-processing, or simulation on the specific region of interest.
Remember to carefully document your steps and maintain clear organization to ensure reproducibility and traceability of your work.
  • asked a question related to OpenFOAM
Question
4 answers
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
Relevant answer
Answer
Yes. OpenFOAM can be used for flow and fluid structure interactions encountered in hemodynamic flow problems.
OpenFOAM and ANSYS Fluent are mainly based on finite-volume method. Whereas, COMSOL is mainly built based on finite-element method.
The notable difference between OpenFOAM and the other two commercial softwares will be the user-interface. OpenFOAM is inherently built on a TUI. Whereas, ANSYS and COMSOL have a very user-friendly GUI.
But, OpenFOAM is very powerfool for research purposes due to its easy customization possibilities.
Meshing using blockMesh of OpenFOAM can be tedious for complex geoemtries. Hence, you have to depend on some third-party meshing applications and snappyHexMesh, etc.
Whereas, ANSYS and COMSOL have better stand-alone meshing capabilities.
  • asked a question related to OpenFOAM
Question
3 answers
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?
Relevant answer
Answer
As you can see, the RANS solution produces an averaged field over the sphere also for laminar vortex shedding.
However, if you have a fully laminar flow, simply solve for it. If You think to have transitional conditions, Depending on you computational power, use LES or DNS.
  • asked a question related to OpenFOAM
Question
5 answers
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.
Relevant answer
Answer
  • asked a question related to OpenFOAM
Question
3 answers
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?
Relevant answer
Answer
In general, for dynamic mesh simulations, models that involve additional terms in the turbulence kinetic energy equation, such as WALE (Wall-adapting Local Eddy-Viscosity) or dynamic Smagorinsky, may be more suitable. These models account for the effects of mesh deformation on the turbulence field and can improve the accuracy of the simulations.
WALE model includes additional terms in the eddy-viscosity calculation that account for the effects of rotation rate, strain rate, and dissipation rate. This model can be more accurate for complex flows with high strain rates and rotation rates, such as flows with vortices or swirling motions.
On the other hand, the Smagorinsky model is a popular choice for LES simulations in OpenFOAM and is widely used for a range of flows. This model uses a constant eddy viscosity coefficient that is proportional to the grid size, which means that it can be computationally efficient for large-scale simulations. However, it may not be as accurate for complex flows or when mesh deformation effects are significant.
When choosing an LES model for dynamic mesh simulations, it is important to consider the specific characteristics of the flow and the desired level of accuracy. It is also recommended to perform sensitivity studies to investigate the effect of different LES models on the results and to validate the simulations against experimental data or other established methods.
  • asked a question related to OpenFOAM
Question
1 answer
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?
Relevant answer
Answer
Hi Lee,
Why not you obtain the force from OpenFOAM and then calculate the force coefficients by yourself. It takes you much more time to go deeply in the code.
By the way, you might find more solutions in CFD online forum.
Best Regards,
Yongbo
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
1- It is possible to generate a harmonic impact test (HIT) inside a rectangle, but the specific terminology for this type of test may vary. HIT is a type of test used to study the response of a structure to dynamic loading. A HIT inside a rectangle would involve applying a dynamic load to a structure in the shape of a rectangle. The specific terminology used to describe this test may vary depending on the field or industry.
2- If Nx = Nz but Ny is different, you can still calculate the power spectrum by analyzing the frequency components of the signals along the three different axes (Nx, Ny, Nz). The frequency components can be obtained using a Fast Fourier Transform (FFT) or similar technique. The power spectrum can be calculated by squaring the magnitude of the FFT and normalizing the result by the number of data points. To account for the difference in Ny, you may need to apply some modifications to the normalization or analysis process.
  • asked a question related to OpenFOAM
Question
1 answer
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.
Relevant answer
After getting to know more about C++ and OpenFoam, I wanna provide an answer to my Q (which is not yet answered!!!). It can be helpful for those who are facing similar problems.
For coupled boundary condition, there are generally two methods in CFD which are ((Partitioned)) and ((Monolithic)).
using the first method, you should firstly define an iteration-based algorithm especially to satisfy the boundary condition (BC)at the interface of the regions (some solvers use this approach).
in second one (Monolithic), you do not need to separate the regions. you can consider just one region for your simulation. In openFoam language, It means that you have just one (fvMatrix) to solve for every EQ. In my case, it is more convenient to use the second method. So, generally you can follow the steps below:
1- Consider the most general equation that can be used for all the regions with modified coefficients (properties).
2- Define your fields (volFields<>).
3- Use setField utility to adjust the coefficients of the equations(properties) according the region.
4- You should simply define just uncoupled BC.
Be aware that in some cases it would be better to (or you must) choose Partitioned method.
Good luck.
  • asked a question related to OpenFOAM
Question
1 answer
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!
Relevant answer
Answer
Hi,
You also have BLAST and, for this, the Battery Software Open Source Landscape, BOLD, GT-AUTOLION...
For more information about this subject, I suggest you see the links on the topic.
Best regards
  • asked a question related to OpenFOAM
Question
2 answers
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,
Relevant answer
Answer
First, I would recommend NOT using png. Journals usually require high-quality vector graphics, so vector eps/pdf should be preferred.
If the comparison is visual, then you might show an array of figures like
mesh1 k-e mesh1 k-w
mesh2 k-e mesh2 k-w
Although presentation of results is mostly a subjective matter, I would arrange smaller figures closer and easier to compare rather than large figures far from one another. This depends a lot on the kind of comparison you have to perform, however.
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
Hi Anglia,
I would say that OpenFOAM is a great software for your project. OpenFOAM's compressible solvers rhoSimpleFoam or rhoPimpleFoam are initially a good choice.
Regarding optimisation, OpenFOAM also has solvers to perform shape and topology optimisation which can be helpful for your application. Nevertheless, the adjoint implementation is not as straightforward as it can initially seem and currently is somewhat restricted to incompressible flows.
You can check the article from C. Othmer to give you a good perspective on the whole fluid mechanics adjoint implementation.
Hope that you find it useful
  • asked a question related to OpenFOAM
Question
5 answers
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
Relevant answer
Answer
Zhuo Zhang Dear Mr. Zhuo Zhang
I tried to use the ICEM to generate the MultiBlockMesh and imported it into OpenFOAM. However, the solver ANSYS Fluent only supports unstructured mesh. So, I wonder what solver you chose when you output the MultiBlockMesh? Any comments or help is welcome.
Regards
  • asked a question related to OpenFOAM
Question
2 answers
Should I use openfoam for direct numerical simulation of compressible turbulence (decaying compressible isotropic turbulence)?
Relevant answer
Answer
Samuel Oluwakorede Oyefusi Thanks for your suggestion.
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Rishikesh Mishra Thank you very much.
  • asked a question related to OpenFOAM
Question
2 answers
I am really stuck and could use some help even if it is in form of collaboration.
Relevant answer
Answer
Hi, I'm welling to help you. I work with Ansys Fluent. I'm interrested in learning to work with Openfoam. If you are interrested, we can try to find a preresult using Ansys and then do the work using Openfoam and then compare results of both codes.
  • asked a question related to OpenFOAM
Question
5 answers
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.
Relevant answer
Answer
Have you tried the Gambit?
  • asked a question related to OpenFOAM
Question
2 answers
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?
Relevant answer
Answer
The fault was in controlDict file thanks for responding. I have solved it.
  • asked a question related to OpenFOAM
Question
2 answers
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?
Relevant answer
Answer
For the pressure B.C, you can use zeroGradient boundary (of course you define pressure initially and suitable pressure BC at the inlet or better at the outlet of the flow). On the other hand velocity B.C is very important in your case look into noSlip, Slip, zeroGradient and partialSlip boundaries.
You should pay attention to near-wall region especially if you have a turbulent flow.
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
Hello Mrs. Raeisi, I am not sure what you mean by having access (you cannot read the files, or find/access the folders), but maybe it can be related to sudo permissions. Depending on the version you are using and how you installed it (some tutorials says to use super users permissions when installing). So, you can try to change the permissions of the folders.
  • asked a question related to OpenFOAM
Question
1 answer
Has anyone tried modelling multiphase flow (interFoam solver) using LRR or SSG turbulence closure in OpenFOAM? I want to discuss about it.
Subhojit
Relevant answer
Answer
Yes, and it does not show good precision.
  • asked a question related to OpenFOAM
Question
14 answers
I'm organizing a course in Italy. Contact me if interested.
Relevant answer
Answer
Yes, Im interested.
  • asked a question related to OpenFOAM
Question
10 answers
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!
Relevant answer
Answer
did olaflow compatible with openfoam 2112????
  • asked a question related to OpenFOAM
Question
2 answers
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?
Relevant answer
Answer
The more stable solvers 'RheoTool' for viscoelastic fluid flow simulations is developed by Pimenta et al. The solver, along with tutorials, is available is https://github.com/fppimenta/rheoTool
  • asked a question related to OpenFOAM
Question
6 answers
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?
Relevant answer
You cannot directly import a CAD file into Openfoam. You need to convert it into a good surface mesh (STL) and then use snappyHexMesh or cfMesh to create a hex-dominant mesh. Then, use checkMesh utility to verify the mesh quality. Also, you can visualize the mesh in Paraview.
  • asked a question related to OpenFOAM
Question
1 answer
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
Relevant answer
Answer
Hi, if you are using a compressible solver, you should give rhoInf the value of the "free stream density", so the density of your medium far from your region of interest, where the compressibility effects occur, in kg/m^3.
If your solver is incompressible, I think you could leave out rhoInf completely, but I am not sure. Probably for a LPT solver you may still need to specify it. Then just put in the value of the then constant density. Your solver is called pimpleLPTFoam? If it is based on pimpleFoam, it should be incompressible.
For a start, you can just try what it does, if you either leave rhoInf out, or give it a random value. After that, you may need to find out what the correct value is for your case.
  • asked a question related to OpenFOAM
Question
5 answers
Hello!
How to plot Time averaged fields in a determined direction, for example in radial or axial direction in paraview with OpenFoam code?
Thanks !
Relevant answer
Answer
you can use TemporalStatistics filter.
  • asked a question related to OpenFOAM
Question
1 answer
Is spoken tutorial IIT Bombay good to learn OpenFOAM
Relevant answer
Answer
@Anoop Narain Singh, you need to learn a little bit ubuntu. You can search your questions in OpenFoam forum website:
  • asked a question related to OpenFOAM
Question
5 answers
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?
Relevant answer
Answer
Yade is open source and allows the use of non-spherical particles (angular polyhedral or clumps of round particles to make complex one). It works with granular flow, but you can also have your solid particles in a fluid by using the integrated version with OpenFoam (you need to compile it and can't use the version that is pre-compiled). It works rather well and it is easy to install and use on Linux. There is a good library of examples and tutorials.
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Answer
Pradyumn Chiwhane I am posting here a previous answer I provided on submerged oscillating bodies in quiescent fluid. The total force exerted by the fluid on the cylinder, you should consider besides the drag the added mass force. Academic references are provided within the following research projects:
  • asked a question related to OpenFOAM
Question
4 answers
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?
Relevant answer
Answer
Qamar Ul Islam thank you for your answer. Actually, I have found a feasible way to interact them and would like to share them with you.
If you want to do a gradient-based optimization, the best framework is DAFoam which integrates Open foam and python in a very practical way for running gradient-based optimizations. On the other hand, if you want to run a gradient-free optimization like me, the pyOptSparse is the ultimate choice as it has multiple optimizers included, but the only thing that remains is the interaction with OpenFOAM which I think is very feasible by adding some lines of code in the script.
Best wishes
  • asked a question related to OpenFOAM
Question
3 answers
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.
Relevant answer
Answer
I have just come across your question. Maybe you already found the solution, but I wanted to add this answer in case it is still useful to you or others.
You could try converting from structured to unstructured grid with VTK and later convert to FOAM with the built-in vtkUnstructuredToFoam tool. A starting point would be adding a structured VTK reader and later following the approach in the following thread to write an unstructured one: https://public.kitware.com/pipermail/vtkusers/2016-November/097119.html.
Hope this helps too.
Kind regards,
Carlos.
  • asked a question related to OpenFOAM
Question
5 answers
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.
Relevant answer
Answer
Taha Zier, if you have the function that represents your Gaussian distribution pulse you can implement that using uniformFixedValue BC. There's a usage example for a step function in the documentation:
The example is for a vector BC. You would need to remove the 'vector(1, 0, 0)' and put your expression for the scalar.
If you already have a table file data represents your pulse, you can also set your BC with:
Hope the above helps. If you can provide with the function you want to reproduce for the 0-2 seconds I would be happy to share a reproducible example. Please see the discussion below in case it's relevant:
Best regards,
Carlos.
  • asked a question related to OpenFOAM
Question
5 answers
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?
Relevant answer
Answer
I refer you to two discussions which bear on the two problems of Eulerian two-fluid models closures: Turbulence and momentum interfacial transfer:
(6) Turbulence Closure for Two-Fluid RANS Modeling (researchgate.net)
(6) Interfacial Transfer Closure for Two-Fluid RANS Modeling (researchgate.net)
Look forward to exchanges on these topics
  • asked a question related to OpenFOAM
Question
4 answers
How to sample pressure and temperature on a oscillating cylinder in using OpenFOAM using sample Dict utility or any other method
Relevant answer
Answer
Daniil A. Ryazanov Thanks for your help.
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
I would prefer to use the TRNSYS software. TRNSYS is a transient systems simulation program with a modular structure. It recognizes a system description language in which the user specifies the components that constitute the system and the manner in which they are connected. The TRNSYS library includes many of the components commonly found in thermal and electrical energy systems, as well as component routines to handle input of weather data or other time-dependent forcing functions and output of simulation results. The modular nature of TRNSYS gives the program tremendous flexibility, and facilitates the addition to the program of mathematical models not included in the standard TRNSYS library. TRNSYS is well suited to detailed analyses of any system whose behaviour is dependent on the passage of time. TRNSYS has become reference software for researchers and engineers around the world. Main applications include: solar systems (solar thermal and photovoltaic systems), low energy buildings and HVAC systems, renewable energy systems, cogeneration, fuel cells.
  • asked a question related to OpenFOAM
Question
1 answer
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
  • asked a question related to OpenFOAM
Question
3 answers
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!
Relevant answer
Answer
Hi Divyajyoti,
you definitely have to export the mesh from Fluent in ASCII format. So here you didn't make a mistake. I assume that there is another problem: Do you have a folder "system" with a file "controlDict" in the directory "sub"? FluentMeshToFoam and Fluent3DMeshToFoam somehow check, if this folder and file exist.
Best regards, Florian
  • asked a question related to OpenFOAM
Question
3 answers
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?
Relevant answer
Answer
You can give a chance to Gmsh software. Just upload your .stl file and try different meshing algorithms.
  • asked a question related to OpenFOAM
Question
3 answers
How to simulate the continuous emission of pollutants from chimneys in OpenFOAM ?
The exhaust from the chimney includes air and pollutant particles.
Thanks !
Relevant answer
Answer
check the articles that I have attached:
  • asked a question related to OpenFOAM
Question
4 answers
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.
Relevant answer
Answer
Thank you very much for this information. Can you kindly give some idea when we expect its release?
  • asked a question related to OpenFOAM
Question
6 answers
There are different versions of OpenFOAM. I want to know which version is more suitable for LES.
Relevant answer
Answer
@Kazi Md. Jahid Hasan, I agree that we can do transient vortex-resolving simulation of flows with OpenFoam. I have used it for such simulations several times. But since it is 2nd order, truncation error can be larger or comparable to modelled properties. See for example Smagorinsky model, where nut is proportional to dx^2. Therefore, I don't think OpenFoam implements LES technology strictly, but most likely it works as something similar.
As i know, there is one third order implementation for OpenFoam by Wildkatze and Arjun Yadav, but I'm not sure whether it is open to community.
The second question is diffusion introduced in implementation of Rhie-Chow interpolation. This artificial diffusion term presents in all transient OpenFoam viscous solvers, regardless of version. Value of this term was unsatisfactory large for some of my problems, that's why I've changed original algorithm. If you want to do LES-like simulations with OpenFoam, then probably you should tune original solver.
Finally, you can take any latest version from openfoam.org (v.9) or openfoam.com (v. 2106) and it should give you similar results if you use incompressible viscous flow model.
  • asked a question related to OpenFOAM
Question
3 answers
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!
Relevant answer
Answer
Hi, you can try:
1) reactingPimpleCentralFoam, which is a part of https://github.com/unicfdlab/hybridCentralSolvers
2) reactingLagrangianQGDFoam, which is a part of https://github.com/unicfdlab/QGDsolver#QGDsolver-library-brief
  • asked a question related to OpenFOAM
Question
5 answers
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?
Relevant answer
Answer
You can use special packages:
1) precIce
2) openPalm
  • asked a question related to OpenFOAM
Question
1 answer
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 !!
Relevant answer
Answer
Interesting
  • asked a question related to OpenFOAM
Question
1 answer
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,
Relevant answer
Answer
Interesting
  • asked a question related to OpenFOAM
Question
4 answers
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
Relevant answer
Answer
Use on OpenFOAM the following command:
fluentMeshToFoam [options] [file.msh] ;
If it is a 3D mesh, only put 3DMesh on the above command. Please refer to this wiki to have more information: https://openfoamwiki.net/index.php/FluentMeshToFoam
  • asked a question related to OpenFOAM
Question
5 answers
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
Relevant answer
Answer
You're welcome Ivan Nepomnyashchikh
You should have opened vtk file with paraview.Parview reads vtk, so there is no need for .foam.
Fo parallel paraview, you can either compile the source and use pvserver or simply enable Auto MPI. I use the former, for the first time it takes a while to install but it is worthwhile. For the latter (I am not sure how efficient it is):
Edit-->settings-->toggle Enable Auto MPI
  • asked a question related to OpenFOAM
Question
3 answers
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?
Relevant answer
Answer
Sorry outside of my field.Best regards
  • asked a question related to OpenFOAM
Question
1 answer
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?
  • asked a question related to OpenFOAM
Question
2 answers
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
Relevant answer
Answer
Thank you for your response, and sorry for the delay.
I read that post, but what I need is a technique in ParaView or OpenFOAM to take a slice out and use it as an input for a new 2D problem to calculate the stream functions.
Sincerely,
Ali
  • asked a question related to OpenFOAM
Question
4 answers
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
Relevant answer
Answer
Sorry for the delay!
What you suggested gives me the average on the red line. What I need is the average velocity on every point of this line along the curve duct.
Regards,
Ali
  • asked a question related to OpenFOAM
Question
6 answers
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.
Relevant answer
Answer
You can go for modelling of multi region flow in any of the three software
- In OpenFOAM there is a multi region solver which you can directly use for your problem
- In COMSOL you can follow the suggestion of Luigi Candido and define the material properties of each region one by one.
- As for Ansys, it also has the option of conjugate modelling which you can employ for your problem.
As for your issue with regions, you can define it based on the material properties and boundary interaction involved for them such as for air - low thermal conductivity and density etc.
  • asked a question related to OpenFOAM
Question
3 answers
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
Relevant answer
Answer
Properties
  • The atmBoundaryLayer class is a base class for handling the inlet boundary conditions providing log-law type ground-normal inflow boundary conditions for wind velocity and turbulence quantities for homogeneous, two-dimensional, dry-air, equilibrium and neutral atmospheric boundary layer (ABL) modelling.
  • Therefore, this class is not an executable boundary condition itself, yet a provider for common entries to its derived conditions.
  • The atmBoundaryLayer inherits the traits of the inletOutlet boundary condition, so that a given inlet condition can be supplied from all sides of the domain, e.g. a ground-normal cylinder domain having a single inlet/outlet boundary where the changes between inlet and outlet depend on the wind direction and patch normals, so that any change in inflow orientation can be handled with the same mesh (i.e. without creating a new mesh).
Model equations
The ground-normal profile expressions are due to [99] and [24] whereat the expressions due to [63] are special cases of those when C1=0 and C2=1:
The ground-normal streamwise flow speed profile expression (([99], Table 1), ([63], Eq. 6), ([24], Eq. 5)):
u=u∗κln(z−d+z0z0)
v=w=0
The ground-normal turbulent kinetic energy profile expression, i.e. k (([99], Eq. 21), ([63], Eq. 7), ([24], Eq. 6 when C1=0 and C2=1)):
k=(u∗)2Cμ−−−√C1ln(z−d+z0z0)+C2−−−−−−−−−−−−−−−−−−−−√
The ground-normal turbulent kinetic energy dissipation rate profile expression, i.e. epsilon (([99], Eq. 22), ([63], Eq. 8), ([24], Eq. 7 when C1=0 and C2=1)):
ϵ=(u∗)3κ(z−d+z0)C1ln(z−d+z0z0)+C2−−−−−−−−−−−−−−−−−−−−√
The ground-normal specific dissipation rate profile expression, i.e. omega ([98], Eq. 13):
ω=u∗κCμ−−−√1z−d+z0
The ground-normal friction velocity profile expression, i.e. u∗ (derived from ([63], Eq. 6), ([24], Eq. 5)):
u∗=urefκln(zref+z0z0)
where
u=Ground-normal streamwise flow speed profile [m/s]v=Spanwise flow speed [m/s]w=Ground-normal flow speed [m/s]k=Ground-normal turbulent kinetic energy (TKE) profile [m2/s2]ϵ=Ground-normal TKE dissipation rate profile [m2/s3]ω=Ground-normal specific dissipation rate profile [m2/s3]u∗=Friction velocity [m/s]κ=von Kármán constant [-]Cμ=Empirical model constant [-]z=Ground-normal coordinate component [m]d=Ground-normal displacement height [m]z0=Aerodynamic roughness length [m]uref=Reference mean streamwise wind speed at zref [m/s]zref=Reference height being used in u∗ estimations [m]C1=Curve-fitting coefficient for [99] profiles [-]C2=Curve-fitting coefficient for [99] profiles [-]
The curve-fitting coefficients, i.e. C1 and C2, can be determined by nonlinear fitting of ([99], Eq. 19-20) with respect to an experimental dataset for k:
k=D1ln(z+z0z0+D2)−−−−−−−−−−−−−−−−−√
where D1 and D2 involve C1 and C2 as follows:
D1=(u2∗Cμ−−−√)2C1
D2=(u2∗Cμ−−−√)2C2
By default, atmBoundaryLayer boundary conditions compute the expressions due to [63].
Usage
Example of the entries provided for the inherited boundary conditions:
inlet { // Mandatory and other optional entries ... // Mandatory (inherited) entries (runtime modifiable) flowDir (1 0 0); zDir (0 0 1); Uref 10.0; Zref 0.0; z0 uniform 0.1; d uniform 0.0; // Optional (inherited) entries (unmodifiable) kappa 0.41; Cmu 0.09; initABL true; phi phi; C1 0.0; C2 1.0; // Conditional mandatory (inherited) entries (runtime modifiable) value uniform 0; // when initABL=false }
where the entries mean:
PropertyDescriptionTypeRequiredDefaultflowDirFlow directionTimeFunction1<vector>yes-zDirGround-normal directionTimeFunction1<vector>yes-UrefReference mean streamwise flow speed being used in u* estimations [m/s]TimeFunction1<scalar>yes-ZrefReference height being used in u* estimations [m]TimeFunction1<scalar>yes-z0Surface roughness length [m]PatchFunction1<scalar>yes-dDisplacement height [m] - see NotesPatchFunction1<scalar>yes-kappavon Kármán constantscalarno0.41CmuEmpirical model constantscalarno0.09initABLFlag to initialise profiles with the theoretical ABL expressions, otherwise use "value" listboolnotruevalueABL profile content when initABL=falsescalarListconditional-phiName of the flux fieldwordnophiC1Curve-fitting coefficientscalarno0.0C2Curve-fitting coefficientscalarno1.0
The inherited entries are elaborated in:
  • inletOutlet
Notes on entries
  • The derived ABL expressions automatically satisfy the simplified transport equation for k. Yet the same expressions only satisfy the simplified transport equation for epsilon when the model constants sigmaEpsilon is 1.11 with kappa=0.4 ([63], p. 358).
  • d is the displacement height, and "is relevant for flows over forests and cities" ([17], p. 28). "The displacement height gives the vertical displacement of the entire flow regime over areas which are densely covered with obstacles such as trees or buildings" ([17], p. 28).
  • z is the ground-normal height relative to the global minimum height of the inlet patch; therefore, the minimum of z is always zero irrespective of the absolute z-coordinate of the computational patch.
  • asked a question related to OpenFOAM
Question
6 answers
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.
Relevant answer
Answer
The problem was about using blockMesh, and its ability to merge. I will try other ways, if the problem could not be solved. I have posted this issue in CFD online and ,as you suggested, will try to seek help in CFD Direct.
Thank you dear Edgar Martinez for your contribution. Please let me know if you find the solution or any other methods.
  • asked a question related to OpenFOAM
Question
1 answer
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
Relevant answer
Answer
It would be convenient to identify the phases that may be present at a given composition, as we do not necessarily have a single homogeneous phase. For that you may search for published references including either the ternary phase diagram of the considered system or related binary phase diagrams. You may possibly find such phase diagrams at the rather comprehensive collections available from ACerS-NIST ─ Phase Equilibria Diagrams Database (*), or at Landolt-Börnstein: Numerical Data and Functional Relationships in Science and Technology ─ New Series, published by Springer.
Solid solutions certainly occur for some composition ranges. Once we have identified its components ─ either pure elements or intermediate crystalline phases ─ we can use a simple linear mixture rule to obtain a coarse estimate of its molar volume, based on the ideal solid solution assumption.
Applying a linear mixture rule directly to densities would not be consistent with the ideal solution assumption and may possibly conduct to larger estimation errors. Better estimates may be possible for the actual (i.e. non-ideal) solid solution, by considering intermediate molar volume data, and/or relying at suitable thermodynamic-based models. You may also alternatively rely at software-based estimates.
  • asked a question related to OpenFOAM
Question
5 answers
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?
Relevant answer
Answer
Dear Essau Rojas in addition to the previous interesting answer, please look at the following FD simulation:
looks like the year is mixed (2021 instead of 2007) but is instructive, it shows the grid & main equations, that is, 12,13 & 14.
  • asked a question related to OpenFOAM
Question
5 answers
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.
Relevant answer
Answer
1.ANSYS:
2.Open FOAM
3.PowerFLOW
4.SimScale
6.Autodesk
7.IVRESS
  • asked a question related to OpenFOAM
Question
4 answers
FLOW 3D is a one-phase numerical model with empirical equations for bedload transport, but OpenFOAM is a physics-based code.
Relevant answer
Answer
According to my experience, modeling the sediment transport in Flow-3D needs a considerable time and computational efforts while the accuracy of your modeling ,depending on the geometry and boundary conditions, is about 10 to 20 percent in the best case.
  • asked a question related to OpenFOAM
Question
2 answers
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?
Relevant answer
Answer
Thanks a lot for the help Anup. Anup Singh
  • asked a question related to OpenFOAM
Question
5 answers
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.
Relevant answer
Answer
The boundary conditions depend on the case by case basis. It also depends on whether you are doing for incompressible flows or compressible.
Suppose you are working with incompressible flows and you have no idea about the initial pressure condition in that case you can opt for velocity inlets. In the same way if you don't have any idea about the velocity at inlet then opt for pressure inlets or mass flow inlet. If you use pressure inlet then always try to provide pressure outlet condition at the outlet. The distance between the inlet and the outlet should be enough to monitor the development of the flow. If the flow is not developed then the boundary conditions will not work for you so the geometry is also important to be understood. In such cases where you assume the the distance between inlet and outlet is very large but you provide a definite small value then try using Zero gradient boundary condition at the outlet to let the system extrapolate values from the region inside the flow domain.
  • asked a question related to OpenFOAM
Question
4 answers
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
Relevant answer
Answer
Sunag Rattehalli Amaranath Do you know how to divide blockmesh into two unconnected computing domains?
  • asked a question related to OpenFOAM
Question
2 answers
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?
  • asked a question related to OpenFOAM
Question
4 answers
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.
Relevant answer
Answer
It's better to formulate new boundary condition by creating new library for that and include that library in controlDict. You can find one in this tutorial:
  • asked a question related to OpenFOAM
Question
4 answers
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.
Relevant answer
Answer
you can do it directly by tecplot.
  • asked a question related to OpenFOAM
Question
1 answer
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.
Relevant answer
Answer
Open-source CFD toolbox: OpenFOAM is now a mature open-source CFD program with reliability matching that of commercial products. This page describes summary of utilities and dictionaries used in OpenFOAM meshing and visualization such as (blockMesh, snappyHexMesh, ParaView) and OpenFOAM CFD codes and pre-processors such as (simpleFoam, pimpleFoam, engineFoam...).
  • asked a question related to OpenFOAM
Question
2 answers
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?
Relevant answer
Answer
Thanks dear A N M Mominul Islam Mukut for your time,
As I saw it, quickly once, it concentrate on mesh orthogonality, not mesh face normals. There is something named 'mesh quallity' which could be used by ctrl+space, too. But I need mesh face normal vectors to check. I'm looking for a filter to do so.
  • asked a question related to OpenFOAM
Question
7 answers
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?
Relevant answer
Answer
reactingFoam, i am working on the pollution too. LOL.
rhoReactingFoam can do this work. just close the combustion.
  • asked a question related to OpenFOAM
Question
5 answers
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 ?
Relevant answer
Answer
  • asked a question related to OpenFOAM
Question
3 answers
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.
Relevant answer
Answer
  • asked a question related to OpenFOAM
Question
4 answers
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.
Any leads will be appreciated.
Regards,
Sunag R A.
Relevant answer
Minh Doan Thanks for the suggestion. I will definitely try ZipUpMesh and update the same. With respect to Meshlab, I have already worked on it, and have attached the image in the question of this topic.
Currently, I am trying to work with Open3D python library, it does work but not satisfactory. It has a lot of open faces which needs to be closed. Looking for particular libraries to close the hole using python. Also, will work with ZipUpMesh as suggested.
Regards,
Sunag R A.
  • asked a question related to OpenFOAM
Question
4 answers
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? 
Relevant answer
Answer
We multiply by 0.5 to avoid double counting of the fluxes. The double counting would appear because we sum phi magnitude (absolute value) over all cell surfaces. Without multiplying by 0.5 we would violate the mass conservation. What flows in the cell in the west surface must leave through the east face.
  • asked a question related to OpenFOAM
Question
2 answers
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.
Relevant answer
Answer
You might have to deal with the source code. My suggestion is to add 'alpha' to chtMultiRegionFoam. You may also try to modify 'multiphaseInterFoam' to solve 'T' and set one of the phase as a solid, which seems easier. Good luck in your new chtMultiRegionInterFoam!
  • asked a question related to OpenFOAM
Question
14 answers
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.
Relevant answer
Answer
Thank you for your suggestion
Jorge Rey Martínez
, at present I am using Ansys CFX and Fluent, as you mentioned sim-flow is free for small projects only, my calculations are mostly large so there is no point changing one commercial software with another, I am interested to switch to a completely free CFD package that is convenient to use. So far I have found two opensource/free GUI for OpenFOAM, HELYX-OS (paid for windows but completely free for Linux) and CfdOF (a workbench of FreeCAD, completely free) worth exploring.
HELYX-OS
CfdOF
  • asked a question related to OpenFOAM
Question
4 answers
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.
Relevant answer
I sorted the issue.
1) Yes your correct, but in HVAC there will be exhaust fan that sucks at particular rate. So if we let the flow dynamics to determine, then there is a chance more flow goes to one outlet than other outlet which might change the streamlines. Also in conventional CFD problem, the flow develops and leaves from one outlet. But here we need specific flow rate at each outlet. Also as there is an option (boundary condition) in openfoam to define flowrateoutletvelocity.
2) Yes as you said p-rgh is computed as you said. We have to define it based on the overall height of the domain, then only hydrostatic pressure will be computed correctly. I do accept it is constant, but if we define it 'zero' then the pressure will become negative.