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

Help with the units of enthalpy (h) in chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By zfaraday
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2014, 15:11
Question Help with the units of enthalpy (h) in chtMultiRegionFoam
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Hello everybody,

I'm struggling to understand how to set up a heat source in a solid region using the fvOptions framework with chtMultiregionFoam solver. However, I need to understand the governing equation used by the program. This is the equation found in the solveSolid.H file:

Code:
        tmp<fvScalarMatrix> hEqn
        (
            fvm::ddt(betav*rho, h)
          - fvm::laplacian(betav*alpha, h, "laplacian(alpha,h)")
          ==
            fvOptions(rho, h)
        );
The first doubt that came to my mind at first was the meaning of betav, I think it is a coefficient that switches between 0 and 1 when the region is a fluid or a solid domain, am I right? Otherwise I can't figure out its meaning...

Now, here come the main doubts I have:
  • Is alpha equal to kappa/(rho*cp)? If so, How is its value retrieved by the program? Because it is not defined in constant/thermoProperties file...
  • Does the exression fvOptions(rho, h) mean that the value of h is multipied by rho somewhere? I was told something like that a few days ago but I don't see it...
  • And finally, what are the units of h within the equation? I started assuming that they were J/kg but I can't find it after taking some notes on paper.

That's all by now, I will appreciate any hint provided.

Many thanks in advance!


Alex
ibitscholar likes this.
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!

Last edited by zfaraday; June 19, 2014 at 09:42. Reason: corrected J/(kg*K) to J/kg
zfaraday is offline   Reply With Quote

Old   June 24, 2014, 03:33
Default
  #2
New Member
 
Martin K
Join Date: Jan 2013
Location: Germany
Posts: 28
Rep Power: 13
Martin_K_lalelu is on a distinguished road
Hi Alex,

did you yet manage to solve your problem?

I got stuck on the same issue, how do I include a heat source in the hEqn and what are the enthalpy`s dimensions?

If you were able to make any progress, I would really appreciate if you could share some Infos!

Best regards,

Martin


Edit: The dimension seems to be J/kg. Info << mag(h) << provides a dimension set of [0 2 -2 0 0 0 0]
Martin_K_lalelu is offline   Reply With Quote

Old   June 24, 2014, 11:04
Default
  #3
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Quote:
Originally Posted by Martin_K_lalelu View Post
Hi Alex,

did you yet manage to solve your problem?

I got stuck on the same issue, how do I include a heat source in the hEqn and what are the enthalpy`s dimensions?

If you were able to make any progress, I would really appreciate if you could share some Infos!

Best regards,

Martin


Edit: The dimension seems to be J/kg. Info << mag(h) << provides a dimension set of [0 2 -2 0 0 0 0]
Hello Martin!

I wish I could give you a positive message, but no, I'm still waiting for any hint. Whenever I find a solution I will let you know. I hope you do the same in case you find it first :P

Thanks for what you said about about the dimensions of enthalpy, where did you find it out? I have been lookig for it like crazy with no success.

Cheers


Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   June 25, 2014, 04:27
Default
  #4
New Member
 
Martin K
Join Date: Jan 2013
Location: Germany
Posts: 28
Rep Power: 13
Martin_K_lalelu is on a distinguished road
Hi,

I saved the Enthalpy in solveSolid.H into a custom variable and made an output with
Code:
Info << "myEnthalpy= " << myEnthalpy << nl << endl;
during runtime. There the dimension set was printed, too.
Martin_K_lalelu is offline   Reply With Quote

Old   June 25, 2014, 05:38
Default
  #5
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Quote:
Is alpha equal to kappa/(rho*cp)? If so, How is its value retrieved by the program? Because it is not defined in constant/thermoProperties file...
If you take a look at solid/setRegionSolidFields.H, you can see

Code:
tmp<volScalarField> talpha = thermo.alpha();
const volScalarField& alpha = talpha();
So alpha is acquired from thermophysical model. And in most of them it is defined as kappa/Cp.

Quote:
Does the exression fvOptions(rho, h) mean that the value of h is multipied by rho somewhere? I was told something like that a few days ago but I don't see it...
Well, almost. Here's the code for the operator:

Code:
template<class Type, class RhoType>
Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
(
    const RhoType& rho,
    GeometricField<Type, fvPatchField, volMesh>& fld,
    const word& fieldName
)
{
    checkApplied();
    
    const dimensionSet ds = rho.dimensions()*fld.dimensions()/dimTime*dimVolume;

    tmp<fvMatrix<Type> > tmtx(new fvMatrix<Type>(fld, ds));

    fvMatrix<Type>& mtx = tmtx();
...
Quote:
And finally, what are the units of h within the equation? I started assuming that they were J/kg but I can't find it after taking some notes on paper.
If you again look at solid/setRegionSolidFields.H

Code:
...
solidThermo& thermo = thermos[i];
...
volScalarField& h = thermo.he();
...
and then if you look at thermophysicalModels/basic/basicThermo/basicThermo.H (parent of solidThermo)

Code:
            //- Enthalpy/Internal energy [J/kg]
            //  Non-const access allowed for transport equations
            virtual volScalarField& he() = 0;
alexeym is offline   Reply With Quote

Old   June 25, 2014, 17:56
Default
  #6
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 22
zfaraday will become famous soon enough
Thank you so much Alexey, that was exactly what I was looking for!

Quote:
Originally Posted by alexeym View Post
Hi,



If you take a look at solid/setRegionSolidFields.H, you can see

Code:
tmp<volScalarField> talpha = thermo.alpha();
const volScalarField& alpha = talpha();
So alpha is acquired from thermophysical model. And in most of them it is defined as kappa/Cp.
Then alpha is not exactly the thermal diffusivity, since thermal diffusivity (aka alpha) is kappa/(rho*Cp), am I right?

Quote:
Well, almost. Here's the code for the operator:

Code:
template<class Type, class RhoType>
Foam::tmp<Foam::fvMatrix<Type> > Foam::fv::optionList::operator()
(
    const RhoType& rho,
    GeometricField<Type, fvPatchField, volMesh>& fld,
    const word& fieldName
)
{
    checkApplied();
    
    const dimensionSet ds = rho.dimensions()*fld.dimensions()/dimTime*dimVolume;

    tmp<fvMatrix<Type> > tmtx(new fvMatrix<Type>(fld, ds));

    fvMatrix<Type>& mtx = tmtx();
...
Well, that's quite scary at first sight when you have no strong skills with C++... :P

I understand that I was pointing at the right direction, I only forgot to divide it by the time and multiply it by the volume, right? I guess that the field called fld in my case would be h(J/kg), then what is given by fvOptions would be Watts, is it right?



Quote:
If you again look at solid/setRegionSolidFields.H

Code:
...
solidThermo& thermo = thermos[i];
...
volScalarField& h = thermo.he();
...
and then if you look at thermophysicalModels/basic/basicThermo/basicThermo.H (parent of solidThermo)

Code:
            //- Enthalpy/Internal energy [J/kg]
            //  Non-const access allowed for transport equations
            virtual volScalarField& he() = 0;
As I said before, many thanks for your clarifying explanations. You helped me a lot understanding it.

Regards,


Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   June 26, 2014, 08:21
Default
  #7
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Quote:
Originally Posted by zfaraday View Post
Then alpha is not exactly the thermal diffusivity, since thermal diffusivity (aka alpha) is kappa/(rho*Cp), am I right?
Well, I'd say here it's implicitly divided by rho. As you can see in ddt operator, it's not ddt(h), it's ddt(rho, h), while in laplacian term it's just h.

Quote:
I understand that I was pointing at the right direction, I only forgot to divide it by the time and multiply it by the volume, right? I guess that the field called fld in my case would be h(J/kg), then what is given by fvOptions would be Watts, is it right?
Yes.
ibitscholar likes this.
alexeym is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, fvoptions


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
Error in thermophysical properties (chtMultiRegionFoam) mukut OpenFOAM Pre-Processing 28 November 23, 2021 07:34
Thermophysical Property Units johanz OpenFOAM Pre-Processing 2 December 16, 2018 11:08
Sensible Enthalpy vs. Total enthalpy Sethi OpenFOAM Programming & Development 3 March 23, 2017 22:48
Enthalpy source of Particle in DPM icemesh FLUENT 1 March 23, 2016 06:19
Enthalpy in a binary gas mixture ChrisA FLUENT 0 August 26, 2013 20:32


All times are GMT -4. The time now is 14:05.