|
[Sponsors] |
Trying to convert a case from laminar to turbulent (K-OmegaSST) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 29, 2020, 02:53 |
Trying to convert a case from laminar to turbulent (K-OmegaSST)
|
#1 |
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 141
Rep Power: 10 |
Hello everyone,
I am currently working on a supersonic Fighter Jet validation case. As I posted before, its an OpenFOAM 4 case, but I am working on improving it. I ran the Laminar Case with no issues, and now I want to get turbulence case going. One issue I am running into is creating BC for alphat, omega, nut and K. These are my current settings: Turbulence Properties (These values were taken from a similar case I was looking into): Code:
/*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | HELYX-OS | | o O o | Version: v2.4.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location constant; object turbulenceProperties; } simulationType RAS; RAS { RASModel kOmegaSST; turbulence on; printCoeffs on; kOmegaSSTCoeffs { label "k-\u03C9 SST"; fieldMaps { k k; omega omega; nut nut; alphat alphatCompressible; } alphaK1 0.85034; alphaK2 1.0; alphaOmega1 0.5; alphaOmega2 0.85616; gamma1 0.5532; gamma2 0.4403; beta1 0.0750; beta2 0.0828; betaStar 0.09; a1 0.31; c1 10; Cmu 0.09; alphah 1.111; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | HELYX-OS | | o O o | Version: v2.4.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ 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.0 0.0); boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type zeroGradient; value uniform ( 0.0 0.0 0.0 ); } outlet { type zeroGradient; value uniform ( 0.0 0.0 0.0 ); } sukhoi { type fixedValue; value uniform (0 0 0); } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | HELYX-OS | | o O o | Version: v2.4.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } dimensions [ 1 -1 -2 0 0 0 0 ]; internalField uniform 101325.0; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type totalPressure; p0 uniform 372518.38; value uniform 101325; rho rho; psi none; U U; phi phi; gamma 1.4; } outlet { type zeroGradient; } sukhoi { type zeroGradient; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | o | | | o o | HELYX-OS | | o O o | Version: v2.4.0 | | o o | Web: http://www.engys.com | | o | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } dimensions [ 0 0 0 1 0 0 0 ]; internalField uniform 300.0; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type fixedValue; value uniform 300; } outlet { type inletOutlet; inletValue uniform 300; value uniform 300; } sukhoi { type zeroGradient; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // kInlet 0.01; dimensions [0 2 -2 0 0 0 0]; internalField uniform $kInlet; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } sukhoi { type zeroGradient; } freestream { type inletOutlet; inletValue uniform $kInlet; value uniform $kInlet; } wall { type kqRWallFunction; value uniform $kInlet; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } sukhoi { type zeroGradient; } freestream { type calculated; value uniform 0; } wall { type compressible::alphatWallFunction; value uniform 0; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object mut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } sukhoi { type zeroGradient; } freestream { type calculated; value uniform 0; } wall { type nutkWallFunction; type nutkWallFunction; value uniform 0; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object omega; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // omegaInlet 10; dimensions [0 0 -1 0 0 0 0]; internalField uniform $omegaInlet; boundaryField { port { type symmetryPlane; } starboard { type symmetryPlane; } bottom { type symmetryPlane; } top { type symmetryPlane; } inlet { type calculated; value uniform 0.000001; } outlet { type calculated; value uniform 0.000001; } sukhoi { type zeroGradient; } freestream { type inletOutlet; inletValue uniform $omegaInlet; value uniform $omegaInlet; } wall { type omegaWallFunction; value uniform $omegaInlet; } #includeEtc "caseDicts/setConstraintTypes" } // ************************************************************************* // Code:
--> FOAM FATAL ERROR: cannot be called for a calculatedFvPatchField on patch inlet of field omega in file "/home/CentOS-VM/Documents/OpenFOAM/OpenFOAM-7/Run/Supersonic_Jet/test/0/omega" You are probably trying to solve for a field with a default boundary condition. From function Foam::tmp<Foam::Field<Type> > Foam::calculatedFvPatchField<Type>::gradientInternalCoeffs() const [with Type = double] in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 188. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::calculatedFvPatchField<double>::gradientInternalCoeffs() const at ??:? #3 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #4 Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #5 Foam::fv::laplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #6 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #7 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::laplacian<double, double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #8 Foam::kOmegaSST<Foam::eddyViscosity<Foam::RASModel<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > > >, Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:? #9 ? at ??:? #10 __libc_start_main in "/lib64/libc.so.6" #11 ? at ??:? Aborted (core dumped) |
|
October 29, 2020, 05:13 |
|
#2 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Hi,
you cant use calculated for omega. For the outlet I would apply zeroGradient and for the inlet fixedValue or turbulentMixingLengthFrequencyInlet. When you have shocks, you should apply limiters to help the solution converge. Some problems may occur with your nut, if you dont apply limiters on your k and omega equations. |
|
October 29, 2020, 16:01 |
Thanks for the clarification
|
#3 | |
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 141
Rep Power: 10 |
Quote:
I appreciate the reply. I am still new to openfoam and my learning has been based on examples in tutorials and other validation cases. A similar compressible case didn't have any additional boundary conditions so I had to add them myself. So for omega I should use: Code:
inlet { type fixedValue; value uniform 0; } outlet { type zeroGradient; } Code:
Inlet { type turbulentMixingLengthFrequencyInlet; } Thanks |
||
October 29, 2020, 16:10 |
|
#4 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
If you set omega to a fixed value, you have to calculate it first. https://www.openfoam.com/documentati...omega-sst.html
You can use the boundary condition like this: Code:
[ inlet { type turbulentMixingLengthFrequencyInlet; mixingLength 1; value uniform 1; } |
|
October 29, 2020, 16:34 |
Thank you for the link
|
#5 | |
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 141
Rep Power: 10 |
Quote:
Edit: I had to make sure the same bc for inlet and outlet were defined in the other files as well. I also made sure to check and set limiters in fvSchemes. Also had to add a few lines in fvSolutions for these new terms. Ran a seriel run for a few iterafions to check if it works. It does , hopefully it doesn't crash when I can get to setting up the parallel run this weekend. Last edited by EternalSeekerX; October 30, 2020 at 05:01. |
||
October 30, 2020, 07:47 |
|
#6 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Thats the inlet boundary condition for omega. For nut and alphat I would just use calculated. For k fixed value or
type turbulentIntensityKineticEnergyInlet; intensity 0.05; value $internalField; For the outlet you can use zeroGradient for k and omega and calculated for nut and alphat. |
|
October 30, 2020, 14:51 |
Appreciate the info
|
#7 | |
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 141
Rep Power: 10 |
Quote:
Will edit that in tonight. Thanks |
||
November 1, 2020, 17:16 |
|
#8 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
Yes, you can intiate your field with 0.
|
|
Tags |
boundary condition, komega sst model, supersonic |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbulent and laminar conditions in one case | Fool | OpenFOAM | 2 | November 23, 2018 09:28 |
Laminar vs Turbulent Navier-Stokes | truman | Main CFD Forum | 8 | July 10, 2017 08:20 |
Convert laminar to turbulent model in IcoFsiFOAM | soheil nazmdeh | OpenFOAM Programming & Development | 0 | August 20, 2013 17:52 |
pisoFoam turbulent case looks like laminar case | inf.vish | OpenFOAM Running, Solving & CFD | 0 | August 16, 2013 04:31 |
Turbulent Flat Plate Validation Case | Jonas Larsson | Main CFD Forum | 0 | April 2, 2004 11:25 |