CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Rho for each species on multi phase simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2022, 14:03
Default 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
cassio is on a distinguished road
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
cassio is offline   Reply With Quote

Reply

Tags
multiphaseeulerfoam, rho, species


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi phase -species transport sajaalrifai Fluent Multiphase 0 October 5, 2020 10:19
Unexpected species increase in discontinuous phase CeesH Fluent Multiphase 0 August 6, 2014 05:41
Multi Species and Discrete Phase Modelling siw FLUENT 1 March 2, 2012 08:37
Simulation with UDF for species mass fraction and velocity profile virgy Fluent UDF and Scheme Programming 8 February 7, 2012 04:30
a question about two phase simulation xck1986 OpenFOAM Running, Solving & CFD 0 June 16, 2011 11:00


All times are GMT -4. The time now is 02:07.