Fan with radiation (usray5.f90)

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Alexandre
Posts: 12
Joined: Wed Mar 21, 2012 2:43 pm

Fan with radiation (usray5.f90)

Post by Alexandre »

Hello,

I don't really have a problem with my simulation but I would like an advise of my method.
I have an radiation calculation with a fan.
For the temperature, I use the method describe in the forum with the subroutine usproj.f90 and usclim.f90

Previous post of Yvan Fournier
Otherwise, if hot air exists the domain and re-enters, you need to compute the average air temperature at the outlet matching that fan (other posts on this forum, as well as the examples in usproj.f90 should help you there), save this value in a global variable (defining a "common block" or user module used by both usproj.f90 an usclim.f90 is possible), then re-use this value for the inlet temperature in usclim.f90.
For the flux it is more complex.Physically, blades of the fan emit radiation (i.e. face of the inlet), so I decide to modify the subroutine usray5.f90.
(I use DO model)

Description of usray5.f90:
First call of usray5.f90 :

Code: Select all

else if (itypfb(ifac).eq.ientre) then
        cofrua(ifac) = epsiVentilo*stephn*(TempEntree**4)*unspi  &
                          + (1.d0-epsiVentilo)* qincid(ifac)*unspi
epsiVentilo : emissivity of the fan
TempEntree : Mean temperature of the inlet. It is mean temperature of the outlet calculate in the subroutine usproj.f90

Second call usray5.f90:

Code: Select all

    else if (itypfb(ifac).eq.ientre then
      if (iirayo.eq.1) then
flunet(ifac) = epsiVentilo *(qincid(ifac) - stephn*TempEntree**4)
During the post-processing of field (flux and temperature), I don't see anything weird but this manipulation of subroutine is complex for me.
I would like to have your opinion of my method.

Thanks in advance for your response
Alexandre
Attachments
usray5.f90
(24.31 KiB) Downloaded 181 times
Yvan Fournier
Posts: 4085
Joined: Mon Feb 20, 2012 3:25 pm

Re: Fan with radiation (usray5.f90)

Post by Yvan Fournier »

Hello,

I am not quite sure, but I believe that radiative subroutines usray3 to usray5 are reserved for advanced modification of radiative transfer parameters, and should in general not be used unless very specific experimental data is available and can thus be "added" into the model (this is the case for at least one of usray3, usray4 or usray5, but I do not remember which).

So you might have a slightly simpler setup using only the main radiative routines, that is usray1 and usray2.

Otherwise, I am not an expert in the radiative model, so I may have missed something, but I do not see any obvious error in your code (but it is always safe to postprocess intermediate terms to check that their order of magnitude is that expected, as once you start combining things, errors in non-dominant terms become hard to spot).

Best regards,

Yvan
Alexandre
Posts: 12
Joined: Wed Mar 21, 2012 2:43 pm

Re: Fan with radiation (usray5.f90)

Post by Alexandre »

Thanks for your answer,
I will follow your advice and make the modification in the subroutine usray2.f90

Have a good weekend
Post Reply