CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to change simulated fluid from air to C02 (https://www.cfd-online.com/Forums/openfoam/88837-how-change-simulated-fluid-air-c02.html)

Aerospace May 27, 2011 06:03

How to change simulated fluid from air to C02
 
Hello everybody!

I would like to make a heat transfer simulation with BuoyantBoussinesqSimpleFoam but I need to employ CO2 as simulated fluid.
Which is the easiest way to change from air to CO2? Notice that BuoyantBoussinesqSimpleFoam doesn't employ thermophysicalProperties file.

Thank you very much in advance!

vkrastev May 27, 2011 06:47

I'm not an expert of the buoyantBoussinesqSimpleFoam solver, but I think that you simply have to set properly your transportProperties file, changing the air properties with the CO2 properties (such as kinematic viscosity, thermal expansion coefficient and Prandtl number) at a reference temperature and pressure suitable for your case.

Regards

V.

Aerospace May 27, 2011 07:38

Quote:

Originally Posted by vkrastev (Post 309486)
I'm not an expert of the buoyantBoussinesqSimpleFoam solver, but I think that you simply have to set properly your transportProperties file, changing the air properties with the CO2 properties (such as kinematic viscosity, thermal expansion coefficient and Prandtl number) at a reference temperature and pressure suitable for your case.

Regards

V.


First, thank you very much for your answer. I agree with you but, what about the heat capacity (Cp)? I think that you can't change it in the transportProperties because there you can only define nu, beta, Tref and Pradtl numbers.

nimasam May 27, 2011 08:40

look for definition of prandtl
http://en.wikipedia.org/wiki/Prandtl_number

besides in source code, you have:
fvScalarMatrix TEqn
(
fvm::div(phi, T)
- fvm::Sp(fvc::div(phi), T)
- fvm::laplacian(kappaEff, T)
);

which kappaEff is calculated like below:

volScalarField kappaEff
(
"kappaEff",
turbulence->nu()/Pr + turbulence->nut()/Prt
);

so you just need to have pr and nu for energy equation calculation

vkrastev May 27, 2011 08:44

Quote:

Originally Posted by Aerospace (Post 309496)
First, thank you very much for your answer. I agree with you but, what about the heat capacity (Cp)? I think that you can't change it in the transportProperties because there you can only define nu, beta, Tref and Pradtl numbers.

Well, actually I think that the "information" carried by the Cp is included in the Prandtl numbers (laminar and turbulent). If you take a look into the TEqn.H file (see below) you will see that the thermal diffusivity employed in the temperature equation is simply derived as nu/Pr (and the same is done for its turbulent counterpart, which is added to the laminar one to obtain the "effective" diffusivity). The thermal diffusivity is also defined as mu*Cp/K, but if you have sufficiently accurate information about nu and Pr you don't need to know anything about Cp, mu or K to let the solver work properly.

Hope this helps

V.

{
volScalarField kappaEff
(
"kappaEff",
turbulence->nu()/Pr + turbulence->nut()/Prt

);

fvScalarMatrix TEqn
(
fvm::div(phi, T)
- fvm::Sp(fvc::div(phi), T)
- fvm::laplacian(kappaEff, T)
);

TEqn.relax();

eqnResidual = TEqn.solve().initialResidual();
maxResidual = max(eqnResidual, maxResidual);

rhok = 1.0 - beta*(T - TRef);
}

vkrastev May 27, 2011 08:45

Oops, someone's been faster than me! :)

Aerospace May 27, 2011 12:26

Thank you very much, both are perfect answers to my question!!!!


All times are GMT -4. The time now is 12:32.