|
[Sponsors] |
simpleFoam Fatal Error: Could not find rho:rho |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 19, 2022, 23:12 |
simpleFoam Fatal Error: Could not find rho:rho
|
#1 |
New Member
GS
Join Date: Sep 2018
Posts: 21
Rep Power: 7 |
I cannot figure out why I keep getting this error. From previous posts, this usually happens because rho is not defined in the controlDict file, but I did define it there.
Screen output: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 SIMPLE: convergence criteria field p tolerance 1e-06 field U tolerance 1e-05 field "(k|omega|e)" tolerance 1e-05 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type RAS Selecting RAS turbulence model SpalartAllmaras Selecting patchDistMethod meshWave SpalartAllmarasCoeffs { Cb2 0.622; Cb1 0.1355; kappa 0.41; sigmaNut 0.66666; Cw3 2; Cv2 5; Cw2 0.3; Cv1 7.1; Cs 0.3; } No MRF models present No finite volume options present Starting time loop forces forces1: Not including porosity effects forceCoeffs forceCoeffs: p: p U: U rho: rhoInf Freestream density (rhoInf) set to 1 Not including porosity effects Time = 1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.04419339, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.074409196, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.043509528, No Iterations 4 GAMG: Solving for p, Initial residual = 1, Final residual = 0.051297006, No Iterations 4 time step continuity errors : sum local = 0.00010679296, global = 7.7896282e-06, cumulative = 7.7896282e-06 smoothSolver: Solving for nuTilda, Initial residual = 0.99999991, Final residual = 0.077435556, No Iterations 3 ExecutionTime = 179.44 s ClockTime = 181 s --> FOAM FATAL ERROR: Could not find rho:rho From void Foam::functionObjects::forces::initialise() in file forces/forces.C at line 235. FOAM exiting |
|
January 20, 2022, 03:20 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,076
Rep Power: 26 |
Hi,
You have defined rho in the forceCoeffs function object, but not in forces1 function. You need to define it there too. Yann |
|
January 22, 2022, 15:16 |
|
#3 |
New Member
GS
Join Date: Sep 2018
Posts: 21
Rep Power: 7 |
Thanks, that worked. I don't understand, though. I was using the case files from an example that solved with rhoSimpleFoam, and that ran with no problem.
|
|
January 23, 2022, 09:44 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,076
Rep Power: 26 |
Since simpleFoam is an incompressible solver, it doesn't compute rho. But you need to know rho is order to compute the forces, this is why you need to define it in the forces function objects.
rhoSimpleFoam is a compressible solver, rho is computed by the solver and retrieved by the forces function object to compute the forces. This is why your function object definition works with rhoSimpleFoam and not with simpleFoam. Cheers, Yann |
|
July 27, 2023, 14:30 |
|
#5 | |
New Member
Prayan
Join Date: Jun 2023
Posts: 10
Rep Power: 2 |
Quote:
I am using simplefoam for power law fluid. Pressure output in openfoam is kinematic. So what is the rho in this case? and how do I change that rho? |
||
July 28, 2023, 03:39 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,076
Rep Power: 26 |
Hello pranay10,
The power law model is only used to compute viscosity. OpenFOAM does not always use kinematic pressure (only for incompressible solvers) simpleFoam indeed uses kinematic pressure so it doesn't need rho and this is why it is not defined anywhere. (and this is also why you need to define it explicitly in the forces function object, as it requires a rho value to compute the forces) So to answer your question: rho is whatever value you want it to be and you don't need to define it to run simpleFoam. Just remember to multiply the pressure p calculated by simpleFoam by rho in order to get the static pressure. (or use the pressure function object to automatically compute fields like static and total pressure. You will have to define rho in the function object definition) Cheers, Yann |
|
July 28, 2023, 04:41 |
|
#7 |
New Member
Prayan
Join Date: Jun 2023
Posts: 10
Rep Power: 2 |
Yann,
Thank You for the response. I have a doubt since simpleFoam uses kinematic pressure (p/rho), then what is the default value of rho in this case? As without a rho being defined, it's not possible to do calculations right? I read through the documentation and code as well but coulnd't find it. |
|
July 28, 2023, 04:49 |
|
#8 | |
New Member
Prayan
Join Date: Jun 2023
Posts: 10
Rep Power: 2 |
Quote:
Thank You for the response. I have a doubt since simpleFoam uses kinematic pressure (p/rho), then what is the default value of rho in this case? As without a rho being defined, it's not possible to do calculations right? I read through the documentation and code as well but coulnd't find it. |
||
July 28, 2023, 05:32 |
|
#9 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,076
Rep Power: 26 |
Quote:
The value of p by itself does not matter in simpleFoam, only the pressure difference matters. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FOAM FATAL ERROR: Cannot find file "points" in directory "shell/polyMesh" | amol_patel | OpenFOAM Pre-Processing | 22 | October 29, 2021 13:34 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
[Commercial meshers] FOAM FATAL ERROR Cannot find match for face 4 | chrisegerer | OpenFOAM Meshing & Mesh Conversion | 8 | April 7, 2008 10:15 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 20:30 |
[blockMesh] FOAM FATAL ERROR Cannot find file points in directory constantpolyMesh | evgenii | OpenFOAM Meshing & Mesh Conversion | 2 | October 9, 2006 15:27 |