From 1161a11931f3b332e80fc3ac707e1e63ad6a38fb Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Tue, 2 Mar 2021 12:49:41 -0800 Subject: [PATCH] STY: Cleaning up tutorial settings --- .../combustion/PDRFoam/createFieldRefs.H | 2 +- .../pipeLattice/constant/PDRProperties | 146 ++------------- .../constant/thermophysicalProperties | 48 +---- .../pipeLattice/constant/turbulenceProperties | 62 +------ .../PDRFoam/pipeLattice/fuels/methane | 22 ++- .../PDRFoam/pipeLattice/system/controlDict | 41 ++++- .../PDRFoam/pipeLattice/system/fvSchemes | 17 -- .../PDRFoam/pipeLattice/system/fvSchemesUp | 98 ---------- .../pipeLattice/system/fvSolutionTrans | 168 ------------------ .../PDRFoam/pipeLattice/system/topoSetDict | 23 --- 10 files changed, 75 insertions(+), 552 deletions(-) delete mode 100644 tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemesUp delete mode 100644 tutorials/combustion/PDRFoam/pipeLattice/system/fvSolutionTrans diff --git a/applications/solvers/combustion/PDRFoam/createFieldRefs.H b/applications/solvers/combustion/PDRFoam/createFieldRefs.H index 2bb79631c49..7a2554713ce 100644 --- a/applications/solvers/combustion/PDRFoam/createFieldRefs.H +++ b/applications/solvers/combustion/PDRFoam/createFieldRefs.H @@ -1,2 +1,2 @@ const volScalarField& psi = thermo.psi(); -scalar pMin = thermo.getOrDefault<scalar>("pMin", VGREAT); +scalar pMin = thermo.getOrDefault<scalar>("pMin", 0); diff --git a/tutorials/combustion/PDRFoam/pipeLattice/constant/PDRProperties b/tutorials/combustion/PDRFoam/pipeLattice/constant/PDRProperties index 0d7f82ef962..5c2fed8b239 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/constant/PDRProperties +++ b/tutorials/combustion/PDRFoam/pipeLattice/constant/PDRProperties @@ -15,19 +15,18 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +smoothSt false; StSmoothCoef 1000.0; -//No smooth if >100 - schelkin { - subGridSchelkin true; - uPrimeCoef 1.0; - lCoef 0.336; - maxSchFac 100.0; - nrCoef 0.1; - nrExp 0.0; - nrExp2 0.05; + subGridSchelkin true; + uPrimeCoef 1.0; + lCoef 0.336; + maxSchFac 100.0; + nrCoef 0.1; + nrExp 0.0; + nrExp2 0.05; } PDRDragModel basic; @@ -47,17 +46,8 @@ basicSchCoeffs Csk 0.0; } -XiModel transport; +XiModel transportTwoEqs; -algebraicCoeffs -{ - XiShapeCoef 1; - XpShapeCoef 1; - CpfiDot 0.0; - CpfiCross 0.0; - GEtaExp 0.0; - LOverCw 0.01; -} transportTwoEqsCoeffs { @@ -69,51 +59,11 @@ transportTwoEqsCoeffs LOverCw 0.01; } -k3Coeffs -{ - k3Obs 10.0; - k3Open 1.0; -} - -transportThreeEqsCoeffs -{ - $transportTwoEqsCoeffs; - $k3Coeffs; -} - -transportFourEqsCoeffs -{ - $transportTwoEqsCoeffs; - $k3Coeffs; -} - -transportOneEqObsCoeffs -{ - XiShapeCoef 1; - Cpfi 0.0; - GEtaExp 0.0; -} - -transportXp -{ -} - -transportCoeffs -{ - XiShapeCoef 1; - GEtaExp 0.28; -} - -fixedCoeffs -{ -} - - /*---------------------------------------------------------------------------*\ XiEqModel : Model for XiEq \*---------------------------------------------------------------------------*/ -XiEqModel instability; +XiEqModel instability2XiEq; BLMcoeffs { @@ -141,12 +91,9 @@ instability2XiEqCoeffs BLMgMaXiEqCoeffs { $schelkin; - gulderCoef 1.0; //this value is not usssed 1.0. kaCoef 0.25; lowK0 0.1; lowKg 0.0; - gMaCoef 0.032; //not used - gMaCoef1 0.0; // not used $BLMcoeffs; } @@ -161,45 +108,6 @@ instability2XiEqCoeffs } } -instabilityCoeffs -{ - - XiEqIn 2.5; - XiEqModel Gulder; - GulderCoeffs - { - uPrimeCoef 1.0; - subGridSchelkin true; - XiEqCoef 0.62; - } - - SCOPEBlendCoeffs - { - XiEqModelL - { - XiEqModel Gulder; - - GulderCoeffs - { - $schelkin; - XiEqCoef 0.62; - } - } - - XiEqModelH - { - XiEqModel SCOPEXiEq; - - SCOPEXiEqCoeffs - { - $schelkin; - XiEqCoef 1.6; - XiEqExp 0.33333; - } - } - } -} - /*---------------------------------------------------------------------------*\ XiGModel : Model for generation of Xi @@ -207,25 +115,10 @@ instabilityCoeffs XiGModel instabilityG; -instability2GCoeffs -{ - lambdaIn 0.0001; - defaultCIn 10.0; - GInMult 5.0; - GInFade 4.0; - - XiGModel KTS; - - KTSCoeffs - { - GEtaCoef 0.28; - } -} - instabilityGCoeffs { - lambdaIn 4.5e-3; - GIn 1.917; + lambdaIn lambdaIn [0 1 0 0 0 0 0] 4.5e-3; + GIn GIn [0 0 -1 0 0 0 0] 1.917; XiGModel KTS; KTSCoeffs @@ -249,11 +142,6 @@ normBasicSubGridCoeffs Cxpe4 1.0; } -basicSubGridCoeffs -{ -} - - /*---------------------------------------------------------------------------*\ XpGModel : Model for generation of Xp \*---------------------------------------------------------------------------*/ @@ -273,14 +161,4 @@ normBasicSubGridGCoeffs Cxpe3 400.0; Cxpe4 1.0; } - -basicSubGridGCoeffs -{ - XpGModel KTS; - KTSCoeffs - { - GEtaCoef 0.28; - } -} - // ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/pipeLattice/constant/thermophysicalProperties b/tutorials/combustion/PDRFoam/pipeLattice/constant/thermophysicalProperties index 34c741869d2..f89092879a2 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/constant/thermophysicalProperties +++ b/tutorials/combustion/PDRFoam/pipeLattice/constant/thermophysicalProperties @@ -15,15 +15,11 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -//thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>; thermoType { type heheuPsiThermo; mixture inhomogeneousMixture; - //mixture sprayHomogeneousMixtureDisp; - //mixture sprayInhomogeneousMixture; - //mixture inhomogeneousMixture; transport sutherland; thermo janaf; equationOfState perfectGas; @@ -31,26 +27,6 @@ thermoType energy absoluteEnthalpy; } -inertSpecie AIR; - -liquids -{ - //liquidComponents ( H2OPS ); - H2OPS - { - defaultCoeffs yes; - } - water - { - defaultCoeffs yes; - } -} - -solids -{ - //solidComponents ( ); -} - stoichiometricAirFuelMassRatio 17.1667; fuel @@ -119,27 +95,7 @@ burntProducts } } -steam -{ - specie - { - nMoles 1; - molWeight 18.02; - } - thermodynamics - { - Tlow 200.00; - Thigh 5000.00; - Tcommon 1000.00; - highCpCoeffs ( 2.67215e+00 3.05629e-03 -8.73026e-07 1.20100e-10 -6.39162e-15 -29899.199219 6.862820); - lowCpCoeffs ( 3.38684e+00 3.47498e-03 -6.35470e-06 6.96858e-09 -2.50659e-12 -30208.099609 2.590230); - } - transport - { - As 1.6721e-06; - Ts 1.7067e+02; - } -} - +dpdt false; +pMin 1e3; // ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/pipeLattice/constant/turbulenceProperties b/tutorials/combustion/PDRFoam/pipeLattice/constant/turbulenceProperties index 103fa71d370..fc38dab2594 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/constant/turbulenceProperties +++ b/tutorials/combustion/PDRFoam/pipeLattice/constant/turbulenceProperties @@ -22,18 +22,6 @@ RAS RASModel PDRkEpsilon; PDRkEpsilonCoeffs - { - Cmu 0.09; - C1 1.44; - C2 1.92; - C3 -0.33;//0; (Original : -0.33) - C4 0.1; - alphah 1; - alphak 1; - alphaEps 0.76923; - } - - PDRkEpsilonFiltCoeffs { Cmu 0.09; C1 1.44; @@ -49,54 +37,8 @@ RAS LOverMobs 0.0; maxLOverCellW 2.0; lCoef 0.35; - resCoef 0.0; - maxResFac 1.0; - filtRadMult 6.0; - bFilt 0.85; - flameFilteredG 1; - } - - PDRRNGkEpsilonCoeffs - { - Cmu 0.0845; - C1 1.42; - C2 1.68; - C3 -0.33; - sigmak 0.71942; - sigmaEps 0.71942; - eta0 4.38; - beta 0.012; - LOverLobs 0.5; - LOverMobs 0.5; - maxLOverCellW 2.0; - lCoef 0.35; - C5 1.5; - C6 1.0; - alphah 1; - alphak 1; - alphaEps 0.76923; - } - - - PDRrealkEpsilonCoeffs - { - Cmu 0.09; - A0 4.0; - C2 1.9; - C3 -0.33; - sigmak 1; - sigmaEps 0.71942; - eta0 4.38; - beta 0.012; - LOverLobs 0.5; - LOverMobs 0.5; - maxLOverCellW 2.0; - lCoef 0.35 ; - C5 1.5; - C6 1.0; - alphah 1; - alphak 1; - alphaEps 0.76923; + bMin 0.85; + flameFilteredG true; } turbulence on; diff --git a/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane b/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane index 12168eed0f0..3a4fa72524e 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane +++ b/tutorials/combustion/PDRFoam/pipeLattice/fuels/methane @@ -4,8 +4,8 @@ name methane; SCOPECoeffs { - lowerFlammabilityLimit 0.502449441017432; - upperFlammabilityLimit 1.68468341988198; + lowerFlamabilityLimit 0.502449441017432; + upperFlamabilityLimit 1.68468341988198; lowerSuPolynomial { @@ -72,7 +72,23 @@ SCOPECoeffs } Texp 2.0; - pexp -0.5; + Texp0 1.5453; + Texp1 -0.4204; + Texp2 3.7503; + Texp3 1.782; + Texp4 0.0; + Texp5 0.0; + Texp6 0.0; + + pexp -0.5; + pexp0 -0.314; + pexp1 0.608; + pexp2 0.0; + pexp3 0.0; + pexp4 0.0; + pexp5 0.0; + pexp6 0.0; + CIn 10.2; } diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/controlDict b/tutorials/combustion/PDRFoam/pipeLattice/system/controlDict index f97eb477618..2794b7399d8 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/system/controlDict +++ b/tutorials/combustion/PDRFoam/pipeLattice/system/controlDict @@ -22,13 +22,13 @@ startTime 0; stopAt endTime; -endTime 0.125; +endTime 0.5; deltaT 5e-06; writeControl runTime; -writeInterval 0.001; +writeInterval 0.01; purgeWrite 0; @@ -53,6 +53,43 @@ maxDeltaT 1; functions { #include "probes" + + normalisedGradP + { + libs (utilityFunctionObjects); + type coded; + name normalisedGradP; + + writeControl none; + writeInterval -1; + executeControl timeStep; + executeInterval -1; + + codeExecute + #{ + + const volScalarField& p = mesh().lookupObject<volScalarField>("p"); + + if (!mesh().foundObject<volScalarField>("normalisedGradP")) + { + volScalarField* normalisedGradPPtr = + new volScalarField("normalisedGradP", mag(fvc::grad(p))); + + normalisedGradPPtr->store(); + + Info << "Found normalisedGradP"<< endl; + } + + volScalarField& normalisedGradP = + mesh().lookupObjectRef<volScalarField>("normalisedGradP"); + + normalisedGradP = mag(fvc::grad(p)); + + Info << "Found not normalisedGradP"<< max(normalisedGradP) << endl; + + #}; + + } } // ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemes b/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemes index 41881353085..f06e87c0a0b 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemes +++ b/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemes @@ -50,23 +50,6 @@ divSchemes div(phi,K) Gauss limitedLinear 1; - div(phi,ft_b_ha_hau_H2OPS_Y) Gauss multivariateSelection - { - ft limitedLinear01 1; - b limitedLinear01 1; - Xi limitedLinear 1; - Xp limitedLinear 1; - Ep limitedLinear 1; - h limitedLinear 1; - hu limitedLinear 1; - ha limitedLinear 1; - hau limitedLinear 1; - H2OPS limitedLinear 1; - water limitedLinear 1; - Y limitedLinear 1; - AIR limitedLinear 1; - }; - div(phi,ft_b_h_hu) Gauss multivariateSelection { ft limitedLinear01 1; diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemesUp b/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemesUp deleted file mode 100644 index 8a1b2b41ab3..00000000000 --- a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSchemesUp +++ /dev/null @@ -1,98 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2012 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSchemes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -ddtSchemes -{ - default Euler; -} - -gradSchemes -{ - default Gauss linear; - grad(p) Gauss linear; - grad(b) fourth; -} - -divSchemes -{ - default Gauss upwind; -/* - div(phi,U) Gauss limitedLinearV 1; - div(phiU,p) Gauss limitedLinear 1; - div(phid,p) Gauss limitedLinear 1; - div(phi,k) Gauss limitedLinear 1; - div(phi,epsilon) Gauss limitedLinear 1; - - div(phiXi,Xi) Gauss limitedLinear 1; - div(phiSt,b) Gauss limitedLinear01 1; - - div(phi,K) Gauss limitedLinear 1; -*/ - div(phi,ft_b_h_hu) Gauss multivariateSelection - { - ft upwind;//limitedLinear01 1; - b upwind;//limitedLinear01 1; - Xi upwind;//limitedLinear 1; - h upwind;//limitedLinear 1; - hu upwind;//limitedLinear 1; - Xp upwind; - Ep upwind; - }; - - div((Su*grad(b))) Gauss linear; - div((U+((Su*Xi)*grad(b)))) Gauss linear; - //div((muEff*dev2(T(grad(U))))) Gauss linear; - div(U) Gauss linear; - div((muEff*dev2(T(grad(Ubet))))) Gauss linear; - div(phi,Ubet) Gauss linear; -} - -laplacianSchemes -{ - default none; - - laplacian(muEff,Ubet) Gauss linear limited 0.333; - laplacian(DkEff,k) Gauss linear limited 0.333; - laplacian(DepsilonEff,epsilon) Gauss linear limited 0.333; - laplacian((rho*inv((((1)*A(Ubet))+tDragDcu))),p) Gauss linear limited 0.333; - //laplacian((rho*inv((((1)*A(U))+((((0.5*rho)*CR)*mag(U))+((((Csu*(1))*betav)*muEff)*sqr(Aw)))))),p) Gauss linear limited 0.333; - laplacian(Db,b) Gauss linear limited 0.333; - laplacian(Db,ft) Gauss linear limited 0.333; - laplacian(Db,h) Gauss linear limited 0.333; - laplacian(Db,hu) Gauss linear limited 0.333; - laplacian(Db,Ep) Gauss linear limited 0.333; - laplacian(Db,GRxp) Gauss linear limited 0.333; - laplacian(Db,GRep) Gauss linear limited 0.333; -} - -interpolationSchemes -{ - default linear; -} - -snGradSchemes -{ - default limited 0.333; -} - -fluxRequired -{ - default no; - p; -} - -// ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSolutionTrans b/tutorials/combustion/PDRFoam/pipeLattice/system/fvSolutionTrans deleted file mode 100644 index 239b3fa89f7..00000000000 --- a/tutorials/combustion/PDRFoam/pipeLattice/system/fvSolutionTrans +++ /dev/null @@ -1,168 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2012 | -| \\ / A nd | Website: www.openfoam.com | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object fvSolution; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -solvers -{ - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-09; - relTol 0.0; - } - - rhoFinal - { - $rho; - } - - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-9; - relTol 0.01; - } - - pFinal - { - $p; - relTol 0; - } - - /* "(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)" - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-09; - relTol 0.01; - } - - "(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)Final" - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-09; - relTol 0; - } - */ - "(b|Xi|Xp|Ep|GRxp|GRep|ft|h|hu|ha|hau|k|epsilon)" - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-09; - relTol 0.05; - } - "(b|Xi|Xp|Ep|GRxp|GRep|ft|h|hu|ha|hau|k|epsilon)Final" - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-09; - relTol 0; - } -} - - -PIMPLE -{ - /* nCorrectors 3; - nOuterCorrectors 1; - nNonOrthogonalCorrectors 3; - momentumPredictor true; - transonic true;*/ - - nCorrectors 1; - nOuterCorrectors 10; - nNonOrthogonalCorrectors 3; - momentumPredictor true; - transonic true; - - residualControl - { - b - { - tolerance 1e-5; - relTol 0; - } - p - { - tolerance 1e-5; - relTol 0; - } - Xi - { - tolerance 1e-5; - relTol 0; - } - Xp - { - tolerance 1e-5; - relTol 0; - } - Ep - { - tolerance 1e-5; - relTol 0; - } - ft - { - tolerance 1e-5; - relTol 0; - } - h - { - tolerance 1e-5; - relTol 0; - } - hu - { - tolerance 1e-5; - relTol 0; - } - k - { - tolerance 1e-5; - relTol 0; - } - epsilon - { - tolerance 1e-5; - relTol 0; - } - U - { - tolerance 1e-5; - relTol 0; - } - } -} - -relaxationFactors -{ - fields - { - } - equations - { - "U" 0.9; - "UFinal" 1.0; - "(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)" 0.9; - "(b|Xi|Xp|Ep|GRxp|GRep|ft|ha|hau|k|epsilon|H2OPS)Final" 1.0; - } -} - -// ************************************************************************* // diff --git a/tutorials/combustion/PDRFoam/pipeLattice/system/topoSetDict b/tutorials/combustion/PDRFoam/pipeLattice/system/topoSetDict index 3fdf3d7fd30..00f404c87da 100644 --- a/tutorials/combustion/PDRFoam/pipeLattice/system/topoSetDict +++ b/tutorials/combustion/PDRFoam/pipeLattice/system/topoSetDict @@ -26,29 +26,6 @@ actions source nearestToCell; points ( $location ); } - - // Optionally grow cellSet by attached? - - /* - { - name corners; - type pointSet; - action new; - source cellToPoint; - set ignition; - option all; - } - - { - name ignition; - type cellSet; - action add; - source pointToCell; - - set corners; - option edge; - } - */ ); -- GitLab