CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Constant Temperature Volumetric region (https://www.cfd-online.com/Forums/cfx/98243-constant-temperature-volumetric-region.html)

saisanthoshm88 March 6, 2012 12:59

Constant Temperature Volumetric region
 
I have a volumetric region in my domain that is supposed to be at a constant temperature.

I see that this can't be modeled using a subdomain as a subdomain in CFX is always defined by a heat flux.

Could some one please tell me how to model such volumetric region with a constant temperature in the domain

evcelica March 6, 2012 13:35

You could use a subdomain with a heat generation rate which is a function of your set temperature. So that once the fluid enters the region it begins quickly heating or cooling to reach your desired temperature. If you try to magicly make it instantly change to a certain temperature, you will have a lot of numerical stability problems which I'm guessing is a reason its not allowed it in the first place.

saisanthoshm88 March 6, 2012 15:18

Thanks for the reply Eric, but the requirement is that the volumetric region has to remain at a constant temperature through out the simulation

ghorrocks March 6, 2012 15:59

It is easy to fix a region to a temperature using a source term. You make the source term inversely proportional to the different between the local temperature and the desired temperature and it quickly converges to the desired temperature. And if you use a source term linearisation term it converges just fine.

Looks up source terms in the documentation.

evcelica March 6, 2012 16:24

Yes Glenn, that's exactly what I was saying, for example:

E.genSource = (T.desired - Temperature)*c.p*density*(1/time constant)


It still not instantly switching to the new temperature, as you still have some sort of a time constant but you can make it very very small.
What you choose as a time constant will be where it starts approaching your temperature, so you could choose 1sec or 10^-whatever seconds.

ghorrocks March 6, 2012 16:29

The normal way of clamping to a temperature is to use a source term of

E source = -C*(T.desired-Temperature)

And a source term linearisation term of:

E source linearisation = -C

You choose the value of C to be large relative to your expected temperature range. Not sure if the units of my source term are right, you may have to add density and/or Cp to get the units right.

This approach clamps it instantly to the desired temperature but still converges fine because of the linearisation term.

saisanthoshm88 March 12, 2012 06:12

Hello Glenn,

If you don't mind could you please explain setting up the source terms in CFX in a detailed way.

I'm sorry but I couldn't find any thing particularly relevant to this context when I searched for " source terms " in the CFX help.

ghorrocks March 12, 2012 16:28

I do not have the time to write tutorials. My previous post explained what you need to do, the documentation has a long explanation of source terms so hopefully you can sort it out from there.


All times are GMT -4. The time now is 16:59.