Hi all,
I have a question concerning the possibility to perform simulation, for example a heated pipe with constant heat flux, with temperature periodicity.
The problem is that if we do nothing, the temperature wills increase without end.
So I have to impose a source term in the energy equation that permits to have the same bulk temperature at the beginning of the pipe.
I feel that the good user subroutine is the ustssc.f90
I did not find the good way to write this subroutine.
I had to do the same development for the QDM equation and I used ifluma(iu(iphas)) but it did not work for the temperature.
Could please show me how to perform this periodicity?
Thanks for this forum and all your answers.
Sylvain
temperature periodicity
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: temperature periodicity
Hello,
Is your pipe an infinite pipe ? In that case, running a calculation with true periodicity (defined in the preprocessing stage), in which case temperature periodicity is handled automatically would be the solution. Since you would have no true inlet and outlet, you would need a velocity source term in a short section of the pipe to drive the velocity (so as to balance friction), but quite a few calculations are run this way. This would simply require defining a velocity using ustsns.f90.
If on the other hand your pipe is finite but you are really trying to simulate an array of real sources to add so as to make the temperature (and only the temperature) periodic, one solution might be to define separate boxes of 1 period in length (for example, in usproj.f90 at the end of each time step, use a "getcel(box[...]'" operation to define a list of cells matching each period. Then compute the flux contributed to those cells (the difference between the inlet temperature*volume*Cp and the integral of temperature*volume*Cp over the box), and save them in a Fortran 'common' structure of your choice. At the start of the new time step, assign an opposite source term over the following section (spread over the length where your source should be).
Best regards,
Yvan
Is your pipe an infinite pipe ? In that case, running a calculation with true periodicity (defined in the preprocessing stage), in which case temperature periodicity is handled automatically would be the solution. Since you would have no true inlet and outlet, you would need a velocity source term in a short section of the pipe to drive the velocity (so as to balance friction), but quite a few calculations are run this way. This would simply require defining a velocity using ustsns.f90.
If on the other hand your pipe is finite but you are really trying to simulate an array of real sources to add so as to make the temperature (and only the temperature) periodic, one solution might be to define separate boxes of 1 period in length (for example, in usproj.f90 at the end of each time step, use a "getcel(box[...]'" operation to define a list of cells matching each period. Then compute the flux contributed to those cells (the difference between the inlet temperature*volume*Cp and the integral of temperature*volume*Cp over the box), and save them in a Fortran 'common' structure of your choice. At the start of the new time step, assign an opposite source term over the following section (spread over the length where your source should be).
Best regards,
Yvan
Re: temperature periodicity
Hello,
I tried to develop the subroutine on a simple geometry that is a pipe but my final work is about a more complex geometry that could be cut in many identical shortest geometries.
I want to run a simulation on a short geometry (for example in the middle of the big geometry). What I know on this short geometry is the flow rate and the bulk temperature at the inlet.
So I run simulation with periodic boundary in order to obtain fully developed flow that always has at the inlet the good flow rate end the good bulk temperature.
The walls are heated by a constant heat flux.
In my case, the bulk velocity that represents my flow rate is 3m/s. At the end of the simulation, when the velocity profile is developed, I obtain good profile at the inlet with zero velocity near the wall and a maximum velocity higher than 3m/s. This profile gives a bulk velocity of 3 m/s.
To do that, I use ustsns in order to add a source term that represent the friction velocity.
Now, for the temperature… I am not sure but the result should be the same.
A bulk temperature at the inlet (323 K) that is always the same and in my opinion highest temperature near the wall than in the centre.
I tried to develop something like for the velocity by comparing the bulk temperature and I obtain good bulk temperature at the inlet but the problem is that the temperature near the wall increase and the temperature in the middle decrease without end
Attached is my subroutine.
I need some help…
Beast regards
Sylvain
I tried to develop the subroutine on a simple geometry that is a pipe but my final work is about a more complex geometry that could be cut in many identical shortest geometries.
I want to run a simulation on a short geometry (for example in the middle of the big geometry). What I know on this short geometry is the flow rate and the bulk temperature at the inlet.
So I run simulation with periodic boundary in order to obtain fully developed flow that always has at the inlet the good flow rate end the good bulk temperature.
The walls are heated by a constant heat flux.
In my case, the bulk velocity that represents my flow rate is 3m/s. At the end of the simulation, when the velocity profile is developed, I obtain good profile at the inlet with zero velocity near the wall and a maximum velocity higher than 3m/s. This profile gives a bulk velocity of 3 m/s.
To do that, I use ustsns in order to add a source term that represent the friction velocity.
Now, for the temperature… I am not sure but the result should be the same.
A bulk temperature at the inlet (323 K) that is always the same and in my opinion highest temperature near the wall than in the centre.
I tried to develop something like for the velocity by comparing the bulk temperature and I obtain good bulk temperature at the inlet but the problem is that the temperature near the wall increase and the temperature in the middle decrease without end
Attached is my subroutine.
I need some help…
Beast regards
Sylvain
Re: temperature periodicity
One more question, when we use constant heat flux for boundary condition, the unit is W/m2 ?
Thank you
Sylvain
Thank you
Sylvain
Re: temperature periodicity
Hi,
the last news and news questions of course...
I choose to use imposed wall temperature for boundary condition, because I don't found how can I do with constant heat flux (in W/m2) without problem (I am already concerned by a solution that permit to use constant heat flux).
1) I choose the temperature equation (in kelvin), and my question is, in the ustssc, what is the unity of the explicit term we can add :
crvexp(iel) = - volume(iel) * A
Is it joule? or A is in joule?
2) my second problem is when is use LES with energy equation, is there some subgrid scale model for the subgrid scale heat flux?
In my simulation, I obtain the following error (divergence of the temperature...)
==============
cs_sles.c:1746: Fatal error.
Jacobi: error (divergence) solving for TempK
Call stack:
1: 0x2b4cf8c3ae4e <reslin_+0x23e> (libsaturne.so.0)
2: 0x2b4cf8d9a926 <invers_+0x256> (libsaturne.so.0)
3: 0x2b4cf8c61f55 <codits_+0x14d5> (libsaturne.so.0)
4: 0x2b4cf8c6e53d <covofi_+0x31bd> (libsaturne.so.0)
5: 0x2b4cf8df59b0 <scalai_+0x22f0> (libsaturne.so.0)
6: 0x2b4cf8e0ceff <tridim_+0xdeef> (libsaturne.so.0)
7: 0x2b4cf8c52ccb <caltri_+0x51ab> (libsaturne.so.0)
8: 0x2b4cf8c31644 <cs_run+0x774> (libsaturne.so.0)
9: 0x2b4cf8c319d5 <main+0x1f5> (libsaturne.so.0)
10: 0x3faf61d8b4 <__libc_start_main+0xf4> (libc.so.6)
11: 0x40a2e9 ? (?)
End of stack
================
What kind of solver, scheme and order do you prefer for a LES with dynamic model and temperature equation?
Thank you for your answers.
Sylvain
the last news and news questions of course...
I choose to use imposed wall temperature for boundary condition, because I don't found how can I do with constant heat flux (in W/m2) without problem (I am already concerned by a solution that permit to use constant heat flux).
1) I choose the temperature equation (in kelvin), and my question is, in the ustssc, what is the unity of the explicit term we can add :
crvexp(iel) = - volume(iel) * A
Is it joule? or A is in joule?
2) my second problem is when is use LES with energy equation, is there some subgrid scale model for the subgrid scale heat flux?
In my simulation, I obtain the following error (divergence of the temperature...)
==============
cs_sles.c:1746: Fatal error.
Jacobi: error (divergence) solving for TempK
Call stack:
1: 0x2b4cf8c3ae4e <reslin_+0x23e> (libsaturne.so.0)
2: 0x2b4cf8d9a926 <invers_+0x256> (libsaturne.so.0)
3: 0x2b4cf8c61f55 <codits_+0x14d5> (libsaturne.so.0)
4: 0x2b4cf8c6e53d <covofi_+0x31bd> (libsaturne.so.0)
5: 0x2b4cf8df59b0 <scalai_+0x22f0> (libsaturne.so.0)
6: 0x2b4cf8e0ceff <tridim_+0xdeef> (libsaturne.so.0)
7: 0x2b4cf8c52ccb <caltri_+0x51ab> (libsaturne.so.0)
8: 0x2b4cf8c31644 <cs_run+0x774> (libsaturne.so.0)
9: 0x2b4cf8c319d5 <main+0x1f5> (libsaturne.so.0)
10: 0x3faf61d8b4 <__libc_start_main+0xf4> (libc.so.6)
11: 0x40a2e9 ? (?)
End of stack
================
What kind of solver, scheme and order do you prefer for a LES with dynamic model and temperature equation?
Thank you for your answers.
Sylvain
Re: temperature periodicity
Hi,
the problem of the divergence comes from my subroutine (used for the periodicty of the temperature).
I add a relaxation factor and it seems to be good (the simulation is not finish...).
I have always two questions...
1) I choose the temperature equation (in kelvin), and my question is,
in the ustssc, what is the unity of the explicit term we can add :
crvexp(iel) = - volume(iel) * A
Is it joule? or A is in joule?
2) my second problem is when is use LES with energy equation,
is there some subgrid scale model for the subgrid scale heat flux?
What kind of solver, scheme and order do you prefer for a LES with dynamic model and temperature equation?
Thank you for your answers.
Sylvain
the problem of the divergence comes from my subroutine (used for the periodicty of the temperature).
I add a relaxation factor and it seems to be good (the simulation is not finish...).
I have always two questions...
1) I choose the temperature equation (in kelvin), and my question is,
in the ustssc, what is the unity of the explicit term we can add :
crvexp(iel) = - volume(iel) * A
Is it joule? or A is in joule?
2) my second problem is when is use LES with energy equation,
is there some subgrid scale model for the subgrid scale heat flux?
What kind of solver, scheme and order do you prefer for a LES with dynamic model and temperature equation?
Thank you for your answers.
Sylvain
Re: temperature periodicity
Hi,
I have new results with RANS simulation.
I done a subroutine using ustssc (in attachement) that permits to impose constant wall temperature in a biperiodic plane channel and to preserve the same mean temperature at the inlet.
To do that, I add an explicit source term. (I need also the ustsns subroutine)
My question is why this subroutine does not works will constant heat flux imposed to the wall.
In that case, the maximum temperature increase without end while the minimum temperature decrease. The mean temperature at the inlet is still the reference I want to preserve.
If you have any ideas, your welcome.
Sylvain
I have new results with RANS simulation.
I done a subroutine using ustssc (in attachement) that permits to impose constant wall temperature in a biperiodic plane channel and to preserve the same mean temperature at the inlet.
To do that, I add an explicit source term. (I need also the ustsns subroutine)
My question is why this subroutine does not works will constant heat flux imposed to the wall.
In that case, the maximum temperature increase without end while the minimum temperature decrease. The mean temperature at the inlet is still the reference I want to preserve.
If you have any ideas, your welcome.
Sylvain
- Attachments
-
- ustssc.f90
- (16.77 KiB) Downloaded 235 times
-
- ustsns.f90
- (17.05 KiB) Downloaded 180 times