Entropy generation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Entropy generation

Post by Hakim »

Hello;

I want to trace the evolution of entropy in my system. Can someone give me the name of the subroutine that allow me to calculate the entropy generated in a given system.

best regards;

H.SEMAI
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Entropy generation

Post by Hakim »

Hello;

can someone inform me about the procedure to be undertaken to evaluate the entropy of a thermodynamic system modeled with saturne_code?

best regards.

Hakim.
Yvan Fournier
Posts: 4091
Joined: Mon Feb 20, 2012 3:25 pm

Re: Entropy generation

Post by Yvan Fournier »

Hello,

This is quite an open question.

For a start, you would need to add a transported variable (a user scalar) for entropy.
After that, you need to define appropriate physical properties and source terms so that it does behave like the Entropy (there is no predefined option for this to my knowledge).

Regards,

Yvan
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Re: Entropy generation

Post by Hakim »

Hello;

The local volumetric rate of entropy generation, based on the second law of thermodynamics, is given for three dimensional flow as follows:

S=(k/T)^2 * [(∂T/∂x)^2+(∂T/∂y)^2+(∂T/∂z)^2 ] +


( μ/T) *

[2((∂u/∂x)^2+(∂v/∂y)^2+(∂w/∂z)^2 )+(∂u/∂y+∂v/∂x)^2+(∂u/∂z+∂w/∂x)^2 +

(∂v/∂z +∂w/∂y )^2 ]

the entropy productions by heat diffusion :

(k/T)^2 * [(∂T/∂x)^2+(∂T/∂y)^2+(∂T/∂z)^2 ]

the entropy productions by viscous friction:

(μ/T) *

[2((∂u/∂x)^2+(∂v/∂y)^2+(∂w/∂z)^2 )+(∂u/∂y+∂v/∂x)^2+(∂u/∂z+∂w/∂x)^2 +

(∂v/∂z +∂w/∂y )^2 ]

T: Temperature [k]
k: Thermal conductivity, (constant) [W/m k]
x,y and z: coordinates system [m]
u,v and w: velocity [m/s]
μ: Viscosity of air, (constant) [kg/m s]


the flow considered is turbulent flow for natural convection within a system equipped an inlet and an outlet.


regards
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Re: Entropy generation

Post by Hakim »

Hello

Can someone tell me how to calculate a function as post-processed quantities:

S=(k/T)^2 * [(∂T/∂x)^2+(∂T/∂y)^2+(∂T/∂z)^2 ] +


( μ/T) *

[2((∂u/∂x)^2+(∂v/∂y)^2+(∂w/∂z)^2 )+(∂u/∂y+∂v/∂x)^2+(∂u/∂z+∂w/∂x)^2 +

(∂v/∂z +∂w/∂y )^2 ].

T: Temperature [k]
k: Thermal conductivity, (constant) [W/m k]
x,y and z: coordinates system [m]
u,v and w: velocity [m/s]
μ: Viscosity of air, (constant) [kg/m s]

Or temperature gradients and velocity gradients of the field.

best regads.

Hakim.
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: Entropy generation

Post by Jacques Fontaine »

Hello,

In versions 3.x you can find some interesting examples in cs_(f)_user_extra_operations-energy-balance.f90.

Regards,
JF
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Re: Entropy generation

Post by Hakim »

Hello,

yes I know but I need a small illustrative example. is it possible for you to give me a small example in detai?

like A=(1/T²)*(dT/dX) +(1/T)*(du/dx).

Best regards,

Hakim.
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Re: Entropy generation

Post by Hakim »

Hello,

I'd like to output this fonction as post-processed result on surface of symetry. can some one help me to do this?

A=(1/T²)*(dT/dX) +(1/T)*(du/dx).

or

A= (1/T²)*grad(T) * (1/T)*grad(U).

Best regards,

Hakim.
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: Entropy generation

Post by Jacques Fontaine »

Hello,

The dedicated subroutine to postpro quantities (fields, ...) on the mesh is cs_user_postprocess_var.f90.

Regards,
Hakim
Posts: 37
Joined: Tue Sep 18, 2012 9:05 am

Re: Entropy generation

Post by Hakim »

Hi Yvan

I want if you can to check these subroutines for me, because even if it works properly I can't have a results that I wwant. However, if I change the name of the variable to be displayed, for example rtp (iel, ivar) or rtp (iel, iu) I get exactly the expected values.

Best regards,

Hakim
Attachments
processus.tar.gz
(527.89 KiB) Downloaded 224 times
Post Reply