View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003612 | OpenFOAM | Bug | public | 2021-01-13 21:52 | 2021-01-19 10:28 |
Reporter | virajbelekar | Assigned To | will | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 18.04.5 LTS |
Summary | 0003612: Heat and Mass Transfer doesn't work correctly when stationaryPhaseModel is used in multiphaseEulerFoam solver | ||||
Description | I am trying to simulate heat transfer between solid, liquid, and gas phases and mass transfer between the liquid and the gas phases for a stationary case. When I try to define the solid and liquid phase as pureStationaryPhaseModel(s), the heat and mass transfer doesn't seem to work correctly. Even if I define just the solid phase as pureStationaryPhaseModel, it doesn't work and the individual phases don't heat up. If there are no stationary phases, i.e., if I define the solid and liquid phases as purePhaseModel and gas phase as multicomponentPhaseModel, the individual phases seem to heat up as expected. I think there is a bug while assigning a phase as stationary if we want to study the heat and mass transfer. A similar kind of bug seems to be reported here: https://bugs.openfoam.org/view.php?id=3132 Although my solver doesn't crash. | ||||
Steps To Reproduce | I have attached the phaseProperties and the thermophysicalProperties files. Just change the purePhaseModel(s) to pureStationaryPhaseModel(s) or vice versa and you can see the issue. | ||||
Tags | No tags attached. | ||||
|
phaseProperties (4,097 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object phaseProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // type interfaceCompositionPhaseChangeMultiphaseSystem; phases (solid liquid gas); solid { type pureStationaryPhaseModel; diameterModel constant; constantCoeffs { d 1e-4; } alphaMax 0.65; residualAlpha 1e-6; } liquid { type pureStationaryPhaseModel; diameterModel constant; constantCoeffs { d 1e-4; } residualAlpha 1e-6; } gas { type multiComponentPhaseModel; diameterModel constant; constantCoeffs { d 1e-4; } residualAlpha 0; } blending { default { type none; continuousPhase gas; } heatTransfer { type linear; minPartlyContinuousAlpha.gas 0.2; minFullyContinuousAlpha.gas 0.39; minPartlyContinuousAlpha.liquid 0.1; minFullyContinuousAlpha.liquid 0.2; minPartlyContinuousAlpha.solid 0.0; minFullyContinuousAlpha.solid 1.0; } diffusiveMassTransfer { type none; continuousPhase gas; } } surfaceTension ( ); aspectRatio ( ); drag ( ); virtualMass ( ); interfaceComposition.solid (); interfaceComposition.liquid (); interfaceComposition.gas ( (gas and liquid) { type saturated; species ( H2O ); Le 0.938; saturationPressure { type AntoineExtended; A 29.8605; B -3.1522e3; C 0; D -7.3037; E 1.8090e-6; F 2; } } ); heatTransfer.solid ( (solid in gas) { type RanzMarshall; residualAlpha 1e-4; } (solid in liquid) { type RanzMarshall; residualAlpha 1e-4; } (gas in solid) { type RanzMarshall; residualAlpha 1e-4; } (liquid in solid) { type RanzMarshall; residualAlpha 1e-4; } ); heatTransfer.liquid ( (liquid in gas) { type RanzMarshall; residualAlpha 1e-4; } (liquid in solid) { type RanzMarshall; residualAlpha 1e-4; } (gas in liquid) { type RanzMarshall; residualAlpha 1e-4; } (solid in liquid) { type RanzMarshall; residualAlpha 1e-4; } ); heatTransfer.gas ( (solid in gas) { type RanzMarshall; residualAlpha 1e-4; } (liquid in gas) { type RanzMarshall; residualAlpha 1e-4; } (gas in liquid) { type RanzMarshall; residualAlpha 1e-4; } (gas in solid) { type RanzMarshall; residualAlpha 1e-4; } ); diffusiveMassTransfer.liquid ( (liquid in gas) { type Frossling; Le 0.938; } ); diffusiveMassTransfer.solid ( ); diffusiveMassTransfer.gas ( (liquid in gas) { type Frossling; Le 0.938; } ); phaseTransfer ( ); lift ( ); wallLubrication ( ); turbulentDispersion ( ); // Minimum allowable pressure pMin 10000; // ************************************************************************* // thermophysicalProperties.gas (1,994 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties.gas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type heRhoThermo; mixture multiComponentMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } inertSpecie air; species ( air H2O ); H2O { specie { molWeight 18.0153; } thermodynamics { Tlow 200; Thigh 3500; Tcommon 1000; highCpCoeffs ( 3.03399 0.00217692 -1.64073e-07 -9.7042e-11 1.68201e-14 -30004.3 4.96677 ); lowCpCoeffs ( 4.19864 -0.00203643 6.5204e-06 -5.48797e-09 1.77198e-12 -30293.7 -0.849032 ); } transport { As 1.67212e-06; Ts 170.672; } } air { specie { molWeight 28.9596; } thermodynamics { Tlow 200; Thigh 3500; Tcommon 1000; highCpCoeffs ( 3.57304 -7.24383e-04 1.67022e-06 -1.26501e-10 -4.20580e-13 -1047.41 3.12431 ); lowCpCoeffs ( 3.09589 1.22835e-03 -4.14267e-07 6.56910e-11 -3.87021e-15 -983.191 5.34161 ); } transport { As 1.67212e-06; Ts 170.672; } } // ************************************************************************* // thermophysicalProperties.liquid (1,063 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type heRhoThermo; mixture pureMixture; //transport const; //thermo hConst; //equationOfState perfectFluid; //specie specie; properties liquid; energy sensibleInternalEnergy; } mixture { H2O { defaultCoeffs yes; } } // ************************************************************************* // thermophysicalProperties.solid (1,400 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermophysicalProperties.solid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // thermoType { type heRhoThermo; mixture pureMixture; transport const; thermo hConst; equationOfState rhoConst; specie specie; energy sensibleInternalEnergy; } mixture { specie { molWeight 100; } equationOfState { rho 1590; } thermodynamics { Cp 1200; Hf 0; } transport { mu 5.765e-7; Pr 1; } } // ************************************************************************* // turbulenceProperties.gas (902 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties.gas; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; // ************************************************************************* // turbulenceProperties.liquid (738 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: dev \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties.liquid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; // ************************************************************************* // turbulenceProperties.solid (1,899 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties.solid; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType RAS; RAS { RASModel kineticTheory; turbulence on; printCoeffs on; kineticTheoryCoeffs { equilibrium off; e 0.91; alphaMax 0.65; alphaMinFriction 0.5; phi 26.56; residualAlpha 1e-6; viscosityModel Syamlal; conductivityModel Syamlal; granularPressureModel SyamlalRogersOBrien; frictionalStressModel Schaeffer; radialModel CarnahanStarling; JohnsonJacksonCoeffs { Fr 0.05; eta 2; p 5; phi 26.56; alphaDeltaMin 0.05; } } phasePressureCoeffs { preAlphaExp 500; expMax 1000; alphaMax 0.65; g0 1000; } SchaefferCoeffs { phi 26.56; } } controlDict (2,125 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application multiphaseEulerFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 1550; deltaT 5e-6; writeControl adjustableRunTime; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable on; adjustTimeStep yes; maxCo 0.2; maxDeltaT 1; functions { fieldAverage1 { type fieldAverage; libs ("libfieldFunctionObjects.so"); writeControl writeTime; fields ( U.particles { mean on; prime2Mean off; base time; } U.air { mean on; prime2Mean off; base time; } alpha.particles { mean on; prime2Mean off; base time; } p { mean on; prime2Mean off; base time; } ); } } // ************************************************************************* // fvSchemes (2,066 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; "div\(phi,alpha.*\)" Gauss vanLeer; "div\(phir,alpha.*\)" Gauss vanLeer; "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; "div\(phi.*,U.*\)" Gauss limitedLinearV 1; "div\(alphaRhoPhi.*,Yi\)" Gauss limitedLinear 1; "div\(alphaRhoPhi.*,(h|e).*\)" Gauss limitedLinear 1; "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; div((((alpha.gas*thermo:rho.gas)*nuEff.gas)*dev2(T(grad(U.gas))))) Gauss linear; div((((thermo:rho.solid*nut.solid)*dev2(T(grad(U.solid))))+(((thermo:rho.solid*lambda.solid)*div(phi.solid))*I))) Gauss linear; div(alphaRhoPhi.solid,Theta.solid) Gauss linear; div((((alpha.liquid*thermo:rho.liquid)*nuEff.liquid)*dev2(T(grad(U.liquid))))) Gauss linear; } laplacianSchemes { default Gauss linear uncorrected; bounded Gauss linear uncorrected; } interpolationSchemes { default linear; } snGradSchemes { default uncorrected; bounded uncorrected; } // ************************************************************************* // fvSolution (2,541 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.*" { nAlphaCorr 2; nAlphaSubCycles 2; smoothLimiter 0.1; implicitPhasePressure yes; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-9; relTol 0; minIter 1; } p_rgh { solver GAMG; smoother DIC; tolerance 1e-8; relTol 0; } p_rghFinal { $p_rgh; relTol 0; } "U.*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-5; relTol 0; minIter 1; } "(h|e).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; minIter 1; } "Theta.*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-6; relTol 0; minIter 1; } "(k|epsilon).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-5; relTol 0; maxIter 0; } "Yi.*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; minIter 1; residualAlpha 1e-8; } } PIMPLE { nOuterCorrectors 5; nCorrectors 3; nNonOrthogonalCorrectors 0; } relaxationFactors { equations { ".*" 1; } } // ************************************************************************* // |
|
Mass transfer is not supported on stationary phases. These phases do not have a volume fraction solution so their volume and mass remain constant. I have added error messages to dev that make that clear. https://github.com/OpenFOAM/OpenFOAM-dev/commit/4b8147c8abda9bd01099485d33d1ef05f55c6e6a It may be possible to implement mass transfer to or from a solid phase, but nobody has thus far provided funding for such work. Can you do so? If you select just solid as stationary then mass transfer should function between liquid and gas, and heat transfer should be possible between all three. If it is not working then there is either a problem with your setup or there is a bug. You have not demonstrated which is the case. See https://bugs.openfoam.org/rules.php. You must provide "Evidence that user error is not the cause of the issue", and "A clear set of instructions that reproduces the issue, including key files, if required". This means uploading an archive of the entire case in question so we can run it and giving a clear explanation about what is wrong about the results. |
|
Hello Will, Thanks for your reply. Also, thanks for letting me know that mass transfer is not supported on stationary phases. In my simulations (attached HT_MT_RanzMarshall.zip), I only define the solid phase as stationary and I don't want mass transfer to or from a solid phase. So, I have two non-stationary phases (liquid and gas) between which mass transfer should happen and heat transfer should happen between all three phases. To reproduce this case, following set of commands needs to be used: blockMesh multiphaseEulerFoam Now, if you change pureStationaryPhaseModel to purePhaseModel for the solid phase in phaseProperties file and use the above set of commands, the heating of phases is quicker and along the expected lines. I ran the simulations for the case where the solid phase is stationary till t = 40 s, and I have also added an animation to show the lack of heating. |
|
The case does not run. Your coded boundary conditions are looking up fields that do not exist. I don't think your comparison would demonstrate a bug in OpenFOAM anyway. Switching the solid to a moving phase model completely changes the simulation. The solid accounts for 98-ish % of the total mass of the system. I'd expect the results to be completely different for a moving vs a stationary solid. I think this is a matter of user support, which is not provided via this site. Closing. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-01-13 21:52 | virajbelekar | New Issue | |
2021-01-13 21:52 | virajbelekar | File Added: phaseProperties | |
2021-01-13 21:52 | virajbelekar | File Added: thermophysicalProperties.gas | |
2021-01-13 21:52 | virajbelekar | File Added: thermophysicalProperties.liquid | |
2021-01-13 21:52 | virajbelekar | File Added: thermophysicalProperties.solid | |
2021-01-13 21:52 | virajbelekar | File Added: turbulenceProperties.gas | |
2021-01-13 21:52 | virajbelekar | File Added: turbulenceProperties.liquid | |
2021-01-13 21:52 | virajbelekar | File Added: turbulenceProperties.solid | |
2021-01-13 21:52 | virajbelekar | File Added: controlDict | |
2021-01-13 21:52 | virajbelekar | File Added: fvSchemes | |
2021-01-13 21:52 | virajbelekar | File Added: fvSolution | |
2021-01-14 10:42 | will | Note Added: 0011813 | |
2021-01-15 18:12 | virajbelekar | File Added: HT_MT_RanzMarshall.zip | |
2021-01-15 18:12 | virajbelekar | Note Added: 0011821 | |
2021-01-19 10:28 | will | Assigned To | => will |
2021-01-19 10:28 | will | Status | new => closed |
2021-01-19 10:28 | will | Resolution | open => no change required |
2021-01-19 10:28 | will | Note Added: 0011822 |