|
[Sponsors] |
How to apply a turbulence model to the rhoCentralFoam solver? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 14, 2016, 10:45 |
How to apply a turbulence model to the rhoCentralFoam solver?
|
#1 |
New Member
A Russell
Join Date: Mar 2016
Posts: 13
Rep Power: 10 |
From a paper I read it found that generally rhoCentralFoam is more accurate than sonicFoam and so I intend to use that for my problem. Having looked at the tutorials for rhoCentralFoam and some information on it, none of them have turbulence models used. Is it straightforward to include a turbulence model with the rhoCentralFoam solver and if so how would I go about that? If possible could you explain with reference to one of the rhoCentralFoam tutorials such as forwardStep so that I can try it with a tutorial case.
Thanks for your help anyone. |
|
April 28, 2016, 07:15 |
|
#2 |
New Member
A Russell
Join Date: Mar 2016
Posts: 13
Rep Power: 10 |
Anyone able to help with this?
|
|
May 3, 2016, 10:22 |
|
#3 |
Member
Join Date: Jun 2012
Posts: 76
Rep Power: 14 |
Hello,
although the tutorials are only laminar / inviscid, rhoCentralFoam supports turbulence out of the box. Simply enable it in the turbulenceProperties file. Kind regards, Martin |
|
July 27, 2020, 00:07 |
|
#4 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
I am new to the solver and OpenFOAM, If you have figured out how to do it, could you please share with me the case file or setting? |
||
July 27, 2020, 06:47 |
|
#5 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
in constant/turbulenceProperties you can change the
simulationsType: simulationsType RAS; RAS { RASModel kOmega; turbulence on; printCoeffs on; } |
|
July 28, 2020, 00:34 |
|
#6 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
However, I dont know whether my k, nut, omega, and alphat setting is correct or wrong. Do you understand how to check whether the turbulence file setting is correct or wrong? #I am sorry for grammatical error, english is not my native language. |
||
July 28, 2020, 05:04 |
|
#7 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
please show me your 0-directory files for the turbulence properties.
|
|
July 28, 2020, 05:46 |
|
#8 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0.001; boundaryField { inlet { type fixedValue; value uniform 0.001; } outlet { type inletOutlet; inletValue uniform 0.001; value uniform 0.001; } bottom { type symmetryPlane; } body { type compressible::alphatWallFunction; value uniform 0.001; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 1e-8; boundaryField { inlet { type fixedValue; value uniform 1e-8; } outlet { type waveTransmissive; value uniform 1e-8; gamma 1.4; } bottom { type symmetryPlane; } body { type kqRWallFunction; value uniform 1e-8; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 1e-5; } outlet { type waveTransmissive; value uniform 1e-5; gamma 1.4; } bottom { type symmetryPlane; } body { type nutkWallFunction; value uniform 0; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 1; boundaryField { inlet { type fixedValue; value uniform 1; } outlet { type inletOutlet; inletValue uniform 1; value uniform 1; } bottom { type symmetryPlane; } body { type omegaWallFunction; value uniform 1; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 1; boundaryField { inlet { type fixedValue; value uniform 1; } outlet { type waveTransmissive; value uniform 1; field p; gamma 1.4; phi sigmaDotU; rho rho; psi thermosi; lInf 0.1; fieldInf 1; } body { type zeroGradient; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 1; boundaryField { inlet { type fixedValue; value uniform 1; } outlet { type inletOutlet; inletValue uniform 1; value uniform 1; } bottom { type symmetryPlane; } body { type zeroGradient; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (3 0 0); boundaryField { inlet { type fixedValue; value uniform (3 0 0); } outlet { type inletOutlet; inletValue uniform (3 0 0); value uniform (3 0 0); } bottom { type symmetryPlane; } body { type noSlip; } empty { type empty; } dummy { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // fluxScheme Kurganov; ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) bounded Gauss linearUpwind limited; div(tauMC) Gauss linear; div(phi,omega) Gauss linear; div(phi,k) Gauss linear; } laplacianSchemes { default none; laplacian(muEff,U) Gauss linear corrected; laplacian(alphaEff,e) Gauss linear corrected; laplacian((rho*DomegaEff),omega) Gauss linear corrected; laplacian((rho*DkEff),k) Gauss linear corrected; } interpolationSchemes { default linear; reconstruct(rho) vanLeer; reconstruct(U) vanLeerV; reconstruct(T) vanLeer; } snGradSchemes { default corrected; } wallDist { method meshWave; //Poisson; //advectionDiffusion; //exactDistance; } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "(rho|rhoU|rhoE)" { solver diagonal; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e-09; relTol 0.01; } h { $U; tolerance 1e-10; relTol 0; } e { $U; tolerance 1e-10; relTol 0; } omega { $U; tolerance 1e-10; relTol 0; } k { $U; tolerance 1e-10; relTol 0; } } // ************************************************** *********************** // Last edited by febriyan91; July 28, 2020 at 06:07. Reason: attached file did not appear |
||
July 28, 2020, 06:34 |
|
#9 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
for alphat:
try for all: type calculated; value uniform 0; except for symmetry plane: type symmetry; how did you come up with 1e-8 for k ? how did you come up with 1 for omega? for nut: change every type to: type calculated; value uniform 0; except for walls: type nutkWallFunction; value uniform 0; and symmetry planes: type symmetry; |
|
July 28, 2020, 09:28 |
|
#10 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
I will try to change the setup, many thanks for your guidance. About the value of k and omega, they were my dumb guess value. I was commercial CFD software user who always pick up default value from the software so my understanding about turbulence value is still shallow. Would you mind to give me suggestion about some reference about "how to define the value of k and omega for different Mach number regimes"? I would really appreciate it Sir. |
||
July 28, 2020, 09:44 |
|
#11 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
https://www.cfd-online.com/Wiki/Turb...ary_conditions
here is everything you need to know. make sure that when you are starting the simulation your time step is small. increase your time step gradually. in your controlDict make these changes: adjustTimeStep yes; maxCo 1; //or any other number thats also ok maxDeltaT 0.01; //optionally you can limit your max delta time step |
|
July 29, 2020, 05:02 |
|
#12 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
I will try another case of rhoCentralFoam by following your guidance. |
||
October 5, 2020, 07:57 |
|
#13 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
Hello Sir, I have succeeded to implement the kw-SST in rhoCentralFoam and the simulation was run without error. However, eventhough I implemented "noSlip" boundary condition at wall with boundary layer mesh, the velocity at wall remains non-zero. Do you know where to spot the problem Sir? I will upload the case file if someone still interested in this case. |
||
October 5, 2020, 09:27 |
|
#14 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 367
Rep Power: 8 |
yeah i know what you mean.
if you choose the "no slip"-condition i can assure you that openfoam takes it into consideration when calculation the velocity field. the problem is that paraview might have problems displaying it bc it doesn't consider the no-slip condition. you can translate your simulation to VTK by executing: foamToVTK -latestTime a new directory with vtk-files will be created. you can open it now and you will see your 0-velocity at boundaries correctly. |
|
October 5, 2020, 20:09 |
|
#15 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
no problem, I have resolved it. It is due to post processing file format read by Paraview. I am using WSL and open the post processing file in xx.foam format. I found in this forum that the post processing format should be converted into VTK by "foamToVTK" command before it's processed using Paraview. |
||
October 5, 2020, 20:11 |
|
#16 | |
New Member
Febriyan Prayoga
Join Date: Apr 2016
Location: Seoul
Posts: 21
Rep Power: 10 |
Quote:
yes. many thanks! *sorry my website page is late refreshed and i have just noticed your reply after my post. |
||
December 19, 2020, 09:12 |
|
#17 |
New Member
Vaishali Ravishankar
Join Date: Sep 2020
Posts: 2
Rep Power: 0 |
Hey Febriyan! I have been trying to simulate the same thing as you, however I get the following error:
Mean and max Courant Numbers = nan nan I get this only when I impose the turbulence model k-Omega. Any idea how to resolve this? Thanks in advance! |
|
July 24, 2022, 12:12 |
error in rhocentralFoam turbulence modeling (RAS)
|
#18 | |
New Member
Shehab Salem
Join Date: Jul 2022
Posts: 2
Rep Power: 0 |
Quote:
Last edited by ShehanSalem86; July 25, 2022 at 05:25. |
||
July 25, 2022, 05:26 |
error in rhocentralFoam turbulence modeling (RAS)
|
#19 |
New Member
Shehab Salem
Join Date: Jul 2022
Posts: 2
Rep Power: 0 |
this is my cases plzz any one help me
FoamFile { version 2.0; format ascii; class volScalarField; object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; boundaryField { INLET { type fixedValue;//calculated; value uniform 0; } OUTLET_2 { type inletOutlet;//zeroGradient;//calculated;//inletOutlet;//calculated; inletValue uniform 0; value uniform 0; } OUTLET { type inletOutlet;//zeroGradient;//calculated; //inletOutlet;//calculated; inletValue uniform 0; value uniform 0; } WALL_1 { type compressible::alphatWallFunction; value uniform 0; } WALL_NOZZLE { type compressible::alphatWallFunction; value uniform 0; } WALL_2 { type compressible::alphatWallFunction; value uniform 0; } } FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 3.75e-9; boundaryField { INLET { type fixedValue; value uniform 3.75e-9; } OUTLET_2 { type waveTransmissive;//inletOutlet;//waveTransmissive;//inletOutlet; value uniform 1.50000000000000002e-16; gamma 1.4; } OUTLET { type waveTransmissive;//inletOutlet;//waveTransmissive;//inletOutlet; value uniform 3.75e-9; gamma 1.4; } WALL_1 { type kqRWallFunction; value uniform 3.75e-9; } WALL_NOZZLE { type kqRWallFunction; value uniform 3.75e-9; } WALL_2 { type kqRWallFunction; value uniform 3.75e-9; } } FoamFile { version 2.0; format ascii; class volScalarField; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { INLET { type fixedValue;//calculated; value uniform 0; } OUTLET_2 { type waveTransmissive;//waveTransmissive;//calculated; value uniform 0; gamma 1.4; } OUTLET { type waveTransmissive;//calculated; value uniform 0; gamma 1.4; } WALL_1 { type nutkWallFunction; value uniform 0; } WALL_NOZZLE { type nutkWallFunction; value uniform 0; } WALL_2 { type nutkWallFunction; value uniform 0; } } FoamFile { version 2.0; format ascii; class volScalarField; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; internalField uniform 3.194e-5; boundaryField { INLET { type fixedValue; value uniform 3.194e-5; } OUTLET_2 { type inletOutlet;//inletOutlet; inletValue uniform 3.194e-5; value uniform 3.194e-5; } OUTLET { type inletOutlet;//zeroGradient;//inletOutlet; inletValue uniform 3.194e-5; value uniform 3.194e-5; } WALL_1 { type omegaWallFunction; value uniform 3.194e-5; } WALL_NOZZLE { type omegaWallFunction; value uniform 3.194e-5; } WALL_2 { type omegaWallFunction; value uniform 3.194e-5; } } FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; boundaryField { INLET { type fixedValue;//totalPressure; //rho none; //psi thermosi; //gamma 1.4; //p0 uniform 225000; value uniform 225000;//$internalField; } WALL_1 { type zeroGradient; } WALL_NOZZLE { type zeroGradient; } WALL_2 { type zeroGradient; } OUTLET_2 { type waveTransmissive;//fixedValue; value uniform 101325; field p; gamma 1.4; phi sigmaDotU; rho rho; psi thermosi; lInf 1; fieldInf 101325; } OUTLET { type waveTransmissive;//fixedValue; value uniform 101325; field p; gamma 1.4; phi sigmaDotU; rho rho; psi thermosi; lInf 1; fieldInf 101325; } } FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 298.15; boundaryField { INLET { type fixedValue; value uniform 298.15; } WALL_1 { type zeroGradient; } WALL_NOZZLE { type zeroGradient; } WALL_2 { type zeroGradient; } OUTLET_2 { type inletOutlet; inletValue uniform 274; value uniform 274; } OUTLET { type inletOutlet; inletValue uniform 274; value uniform 274; } } FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { INLET { type fixedValue; value uniform (0.001 0 0); } WALL_1 { type noSlip; } WALL_NOZZLE { type noSlip; } WALL_2 { type noSlip; } OUTLET_2 { type inletOutlet; inletValue uniform (0.001 0 0); value uniform (0.001 0 0); } OUTLET { type inletOutlet; inletValue uniform (0.001 0 0); value uniform (0.001 0 0); } } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A new EARSM turbulence model implementation | elbertj | OpenFOAM Programming & Development | 8 | February 6, 2018 15:12 |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 05:59 |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 01:01 |
Overflow Error in Multiphase Modelling with Two Continuous Fluids | ashtonJ | CFX | 6 | August 11, 2014 15:32 |
Discussion: Reason of Turbulence!! | Wen Long | Main CFD Forum | 3 | May 15, 2009 10:52 |