CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Reading in Species for multicomponent mixture (https://www.cfd-online.com/Forums/openfoam/81531-reading-species-multicomponent-mixture.html)

nakul October 29, 2010 06:35

Reading in Species for multicomponent mixture
 
Hi,

I am using "multicomponent mixture" in my thermophysicalProperties.

I have to analyse a mixture of Hydrogen and Oxygen. For this I am trying to feed the thermophysical properties of O2 ans H2. But I am unable to figure out the proper way in which this is to be done.

There is no example as to how multiple species are read by OpenFOAM while using multicomponent mixture.

Can anybody help with this?

nakul October 29, 2010 07:40

I think the problem is with formatting.

Can anybody tell me what is the proper formatting to be used for multicomponent mixtures ?

G.Maragkos August 4, 2011 05:13

Hi,

Sorry to come back in this old thread but did you find a solution to your problem? I also want to use multicomponentMixture and i can't figure out how to define the species data

Regards,
Giorgos

nakul August 4, 2011 13:40

Hi,

Unfortunately I haven't found an answer to this problem. I managed to complete my job while avoiding this problem. But I am still interested in finding the solution to this problem.

So if you come up with something, please do share here. Also tell me what you intend to do and I would then give you some hints for solving this problem.

-Nakul

G.Maragkos August 15, 2011 12:21

Hi Nakul,

I think the format must be something like this (the values i have put don't match the species). At least when i have this format as input it doesn't complain that the keyword species isn't found. Hope it helps you.


thermoType hPsiMixtureThermo<multiComponentMixture<gasThermoP hysics>>;

species
(
H2
CO2
);


H2 H2 1 32.04186 200 5000 1000 1.78970791E+0 1.40938292E-02 -6.36500835E-06 1.38171085E-09 -1.17060220E-13 -2.53748747E+04 1.45023623E+01 5.71539582E+00 -1.52309129E-02 6.52441155E-05 -7.10806889E-08 2.61352698E-11 -2.56427656E+04 -1.50409823E+00 1.67212e-06 170.672;

CO2 CO2 1 28.8507321 200 6000 1000 3.00140845E+00 1.48694964E-03 -6.08284964E-07 1.23764534E-10 -9.88747461E-15 -9.57600225E+02 5.86975138E+00 3.40031132E+00 4.82825576E-04 -1.06185141E-06 2.42243725E-09 -1.24977367E-12 -1.02994269E+03 3.88888119E+00 1.67212e-05 190.672;


Regards,
Giorgos

ziemowitzima March 3, 2014 08:39

Hi,
I am trying to do similar thing, but I have an error,
were you using it in reactinFOAM ?


--> FOAM FATAL ERROR:
Attempt to return primitive entry ITstream : /home/zima/OpenFOAM/zima-2.1.0/run/tutorials/combustion/reactingFoam/ras/helium_spill_multiComponentMixture/constant/thermophysicalProperties::N2, line 25, IOstream: Version 2.0, format ASCII, line 0, OPENED, GOOD
primitiveEntry 'N2' comprises
on line 25 the label 1
on line 25 the doubleScalar 32.0419
on line 25 the label 200
on line 25 the label 5000
on line 25 the label 1000
on line 25 the doubleScalar 1.78971
on line 25 the doubleScalar 0.0140938
on line 25 the doubleScalar -6.36501e-06
on line 25 the doubleScalar 1.38171e-09
on line 25 the doubleScalar -1.1706e-13 ...
as a sub-dictionary


tnaks
ZMM

dahicocuk August 18, 2014 21:30

how to define species for nanofluids
 
Quote:

Originally Posted by G.Maragkos (Post 320123)
Hi Nakul,

I think the format must be something like this (the values i have put don't match the species). At least when i have this format as input it doesn't complain that the keyword species isn't found. Hope it helps you.


thermoType hPsiMixtureThermo<multiComponentMixture<gasThermoP hysics>>;

species
(
H2
CO2
);


H2 H2 1 32.04186 200 5000 1000 1.78970791E+0 1.40938292E-02 -6.36500835E-06 1.38171085E-09 -1.17060220E-13 -2.53748747E+04 1.45023623E+01 5.71539582E+00 -1.52309129E-02 6.52441155E-05 -7.10806889E-08 2.61352698E-11 -2.56427656E+04 -1.50409823E+00 1.67212e-06 170.672;

CO2 CO2 1 28.8507321 200 6000 1000 3.00140845E+00 1.48694964E-03 -6.08284964E-07 1.23764534E-10 -9.88747461E-15 -9.57600225E+02 5.86975138E+00 3.40031132E+00 4.82825576E-04 -1.06185141E-06 2.42243725E-09 -1.24977367E-12 -1.02994269E+03 3.88888119E+00 1.67212e-05 190.672;


Regards,
Giorgos


HI Giorgos,

I am doing numerical simulation for nanofluids.I have a thermophysical properties file that explains thermal properties of nanofluids such as thermal conductivity and viscosity. When I put these values in the file,it gives an error that says "keyword species is undefined". Could you please tell me that how I can define species properties for Al2O3/Water nanofluid?

Thank you.

dkxls August 19, 2014 07:03

Quote:

Originally Posted by dahicocuk (Post 506530)
When I put these values in the file,it gives an error that says "keyword species is undefined". Could you please tell me that how I can define species properties for Al2O3/Water nanofluid?

At first, please note that this is a old thread dealing with thermophysical properties for OpenFAOM 2.1.x and earlier. With OpenFAOM 2.2.0 the thermodynamic classes changed quite a bit.

To your problem:
Can you be more specific on what you want to simulate?
  1. Is your fluid liquid or gaseous?
  2. Is it a multi-component mixture?
    If it is a multi-component mixture, do you want to simulate it as a multi-component mixture or can you assume it to be homogenous and assign thermophysical properties for the mixture (like often done with air).
  3. In which format do you have the thermophysical properties currently?

dahicocuk August 19, 2014 12:19

Quote:

Originally Posted by dkxls (Post 506604)
At first, please note that this is a old thread dealing with thermophysical properties for OpenFAOM 2.1.x and earlier. With OpenFAOM 2.2.0 the thermodynamic classes changed quite a bit.

To your problem:
Can you be more specific on what you want to simulate?
  1. Is your fluid liquid or gaseous?
  2. Is it a multi-component mixture?
    If it is a multi-component mixture, do you want to simulate it as a multi-component mixture or can you assume it to be homogenous and assign thermophysical properties for the mixture (like often done with air).
  3. In which format do you have the thermophysical properties currently?

Hi,

I have a nanofluid that is Al2O3/Water. Al2o3 nanoparticles are spherical and they have 20 nm diameter.I am assuming that they are homogeneous in the mixture as a single phase.To be more specific;

1.My fluid is liquid/solid.

2.I am assuming it is homogeneous and single phase flow for simulation of nanofluids in a laminar pipe flow.

3.Thermophysical properties of nanofluids such as thermal conductivity,viscosity,specific heat and density are as a function of temperature.

4. I am using compressible/rhoSimpleFoam solver but, I could not figure out how I would implement my codes(thermophysical properties of nanofluids) in thermophysical file.

If you are able to help me to figure out this problem, I will more appreciate it.

Thank you

dkxls August 19, 2014 12:46

Quote:

Originally Posted by dahicocuk (Post 506683)
2.I am assuming it is homogeneous and single phase flow for simulation of nanofluids in a laminar pipe flow.

Alright, so you problem has nothing to do with multi-component mixtures. One source of errors ruled out. ;)

Quote:

Originally Posted by dahicocuk (Post 506683)
3.Thermophysical properties of nanofluids such as thermal conductivity,viscosity,specific heat and density are as a function of temperature.

Well, which function?

OpenFOAM has many models implemented for all kind of thermophysical properties, depending on which kind of model you want to use you have to specify the input data accordingly.
For a list of all models, you can just run any tutorial and change the thermo type to 'XXX', OpenFOAM will then print out all valid thermo types for that specific solver.

Also, here are two examples of how to specify the coefficients for various thermophysical models:
Code:

heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/thermophysicalProperties
rhoCentralFoam/biconic25-55Run35/constant/thermophysicalProperties

-Armin

dahicocuk August 19, 2014 13:01

Hi Armin,

What do you mean "which function"? I am using compressible solver since assuming base fluid(water) density as a function of temperature.Are you recommending to use heat transfer solver instead of compressible solver? Could you please let me know how I fix this problem? Should I add entire code to create a new thermophysical file?

Thanks

dkxls August 19, 2014 13:15

Quote:

Originally Posted by dahicocuk (Post 506688)
Are you recommending to use heat transfer solver instead of compressible solver?

No not at all! If you think rhoSimpleFoam, i.e. a compressible steady-state solver, is the right one then you should use it! I was just talking about the thermophyscial models.

Quote:

Originally Posted by dahicocuk (Post 506688)
Should I add entire code to create a new thermophysical file?

No I don't think you have to add any "code", just edit your "thermophysicalProperties" file according to your problem setup.

As a last hint, I think the correct mixture type for you to start with is "pureMixture", which narrows down the selection already quite a bit. ;)

-Armin

dahicocuk August 25, 2014 00:09

Hi Armin,

I have modified my thermophysical property file according to my problem set up. However, I have encountered a new problem that says"keyword equationOfState is undefined in dictionary".IN the problem set up, I am assuming Al2o3/water nanofluids as a single phase. Could you please recommend me how I can define equation of state for nanofluids? Also I am attaching my thermophysical file.


SIMPLE: no convergence criteria found. Calculations will run for 1000 steps.

Reading thermophysical properties

Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport polynomial;
thermo hPolynomial;
equationOfState icoPolynomial;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
nMoles 1;
molWeight 46;

}
thermodynamics
{
Cp 3930; // specific heat of Al2o3/water nanofluid
Hf 0;
Cp_f 4318; // specific heat of water
Cp_p 765; // specific heat of Al2o3
rhof 1000; // density of water
rhop 3970; // density of Al2o3 nanoparticle
rho 1090; // density of Al2o3/water nanofluid
k 0.6539; // thermal conductivity of Al2o3/water nanofluid
k_f 0.5912; // thermal conductivity of Al2o3/water nanofluid
k_p 40; // thermal conductivity of Al2o3 nanoparticle
k_boltz 1.381e-23; // boltzmann constant


}
transport
{
d_p 2e-8; // diameter of nanoparticle
feta 0.03; //volume concentration of nanoparticle
fut 0.0003159; //constant
As 1.4792e-06;
Ts 116;
mu 0.001088; //dynamic viscosity of nanofluid
mu_f 0.001005; //dynamic viscosity of water
Pr 6.395;

}
}

specie

{

H2O;
Al2O3;

};

ktk June 27, 2016 23:00

Multicomponent mixture
 
I wanted to simulate multicomponent mixing ie.2 gases..
how do i modify reactingFoam

openfoammaofnepo May 1, 2017 17:52

Hello,

For multiComponentMixture, I tried two species in the reactingTwoPhaseEulerFoam, which worked very well. However, when I increased the number of the species from 2 to 3, the solver always crashed. I am not sure what happen. The output error information is Floating point exception. This is really strange. Does anybody also meet the same problem?

Thank you in advance.

best regards,
OFFO


All times are GMT -4. The time now is 16:51.