March 15, 2022, 14:03
|
Rho for each species on multi phase simulation
|
#1
|
New Member
Cássio Césio Lopes Azevedo
Join Date: Feb 2022
Posts: 2
Rep Power: 0
|
Hi,
I want to calculate the total mass, inside the domain, for each of the components of a multi phase simulation.
For the particles phase I have two species ("fibras" + "H2O") and the rho was defined in equationOfState for each species.
Code:
thermoType
{
type heRhoThermo;
mixture multiComponentMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}
species
(
fibras
H2O
);
inertSpecie H2O;
"(mixture|fibras)"
{
specie
{
molWeight 9.72;
}
equationOfState
{
rho 1470;
}
thermodynamics
{
Cp 3090;
Hf 0;
}
transport
{
mu 0;
Pr 1;
}
}
H2O
{
specie
{
molWeight 18.0153;
}
equationOfState
{
rho 1000;
}
thermodynamics
{
Cp 4195;
Hf -1.5879e+07;
}
transport
{
mu 3.645e-4;
Pr 2.289;
}
}
But to finish the calculation I need to access the density of each component of the mixture, however find only the average rho.
Code:
difference
{
type coded;
libs ("libutilityFunctionObjects.so");
name teste;
codeWrite
#{
const scalarField& volume = mesh().V();
const volScalarField& alphaParticles = mesh().lookupObject<volScalarField>("alpha.particles");
const volScalarField& fibrasParticles = mesh().lookupObject<volScalarField>("fibras.particles");
const volScalarField& H2OParticles = mesh().lookupObject<volScalarField>("H2O.particles");
//const volScalarField& rhoMedio = mesh().lookupObject<volScalarField>("thermo:rho.particles");
auto vTotal = gSum(volume);
auto vBagaco = gSum(volume * alphaParticles);
auto vFibras = gSum(volume * alphaParticles * fibrasParticles);
auto vH2O = gSum(volume * alphaParticles * H2OParticles);
auto massaFibras = gSum(volume * alphaParticles * fibrasParticles * 1470); //rho fibras = 1470 [kg/m3]
auto massaH2O = gSum(volume * alphaParticles * H2OParticles * 1000); //rho H2O = 1000 [kg/m3]
Info << "Volume Total do Secador: " << vTotal << " m3 " << endl;
Info << "Volume de Bagaço: " << vBagaco << " m3 " << endl;
Info << "Volume de Fibras: " << vFibras << " m3 " << "| Peso das Fibras: " << massaFibras << " kg " << endl;
Info << "Volume de H2O: " << vH2O << " m3 " << "| Peso de H20: " << massaH2O << " kg " << endl ;
#};
}
Can anyone help?
Have a nice day!
Cássio
|
|
|