diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H index b64277749e..b9a47a917d 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H @@ -19,34 +19,46 @@ fvScalarMatrix he1Eqn ( - fvm::ddt(alpha1, he1) - + fvm::div(alphaPhi1, he1) + fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1) + + fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1) // Compressibity correction - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1) + - (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1 + + + ( + he1.name() == "e" + ? fvc::div(alphaPhi1, p) + : -dalpha1pdt + )/rho1 - fvm::laplacian(k1, he1) == heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1 + heatTransferCoeff*he1/Cpv1/rho1 - fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1) - + alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1))) ); fvScalarMatrix he2Eqn ( - fvm::ddt(alpha2, he2) - + fvm::div(alphaPhi2, he2) + fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2) + + fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2) // Compressibity correction - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2) + - (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2 + + + ( + he2.name() == "e" + ? fvc::div(alphaPhi2, p) + : -dalpha2pdt + )/rho2 - fvm::laplacian(k2, he2) == heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2 + heatTransferCoeff*he2/Cpv2/rho2 - fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2) - + alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2))) ); he1Eqn.relax(); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H index cf19664d85..54a61f51d2 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H @@ -275,8 +275,8 @@ ); - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt + Info<< "Creating field dalpha1pdt\n" << endl; + volScalarField dalpha1pdt ( IOobject ( @@ -285,7 +285,20 @@ mesh ), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + dimensionedScalar("dalpha1pdt", p.dimensions()/dimTime, 0) + ); + + Info<< "Creating field dalpha2pdt\n" << endl; + volScalarField dalpha2pdt + ( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dalpha2pdt", p.dimensions()/dimTime, 0) ); Info<< "Creating field kinetic energy K\n" << endl; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index f9a7807d00..bf75b28d05 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -192,6 +192,11 @@ if (thermo1.dpdt()) { - dpdt = fvc::ddt(p); + dalpha1pdt = fvc::ddt(alpha1, p); + } + + if (thermo2.dpdt()) + { + dalpha2pdt = fvc::ddt(alpha2, p); } } diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater index 43cb59fafa..672b24a98b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater @@ -31,12 +31,11 @@ mixture specie { nMoles 1; - molWeight 18; + molWeight 28.9; } equationOfState { rho0 1027; - R 3000; } thermodynamics { diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes index 1851801037..3335348f05 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes "div\(phid.*,p\)" Gauss upwind; "div\(alphaPhi.*,h.*\)" Gauss limitedLinear 1; - "div\(phi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,K.*\)" Gauss limitedLinear 1; "div\(alphaPhi.*,(k|epsilon)\)" Gauss limitedLinear 1; } diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 index 94e852ea58..0ac5f83a42 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 @@ -23,7 +23,7 @@ thermoType thermo hConst; equationOfState rhoConst; specie specie; - energy sensibleEnthalpy; + energy sensibleInternalEnergy; } mixture diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 index 11c033af59..e61009c10b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 @@ -23,7 +23,7 @@ thermoType thermo hConst; equationOfState perfectGas; specie specie; - energy sensibleEnthalpy; + energy sensibleInternalEnergy; } mixture diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes index 8799476cc7..c69e87c4fb 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes @@ -37,8 +37,8 @@ divSchemes "div\(\(alpha.*Rc\)\)" Gauss linear; "div\(phid.,p\)" Gauss upwind; - "div\(alphaPhi.,h.\)" Gauss limitedLinear 1; - "div\(phi.,K.\)" Gauss limitedLinear 1; + "div\(alphaPhi.,(h|e).\)" Gauss limitedLinear 1; + "div\(alphaPhi.,K.\)" Gauss limitedLinear 1; div(alphaPhi2,k) Gauss limitedLinear 1; div(alphaPhi2,epsilon) Gauss limitedLinear 1; diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution index 1c5fdb8117..a2906e9722 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0; } - "h.*" + "(h|e).*" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 index 43cb59fafa..672b24a98b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 @@ -31,12 +31,11 @@ mixture specie { nMoles 1; - molWeight 18; + molWeight 28.9; } equationOfState { rho0 1027; - R 3000; } thermodynamics { diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes index c88d130244..6af6a5df12 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes "div\(phid.,p\)" Gauss linear; "div\(alphaPhi.,h.\)" Gauss limitedLinear 1; - "div\(phi.,K.\)" Gauss linear; + "div\(alphaPhi.,K.\)" Gauss limitedLinear 1; "div\(alphaPhi.,(k|epsilon)\)" Gauss limitedLinear 1; }