CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to initialize stratified temperature profile in a rectangular tank (https://www.cfd-online.com/Forums/cfx/152887-how-initialize-stratified-temperature-profile-rectangular-tank.html)

moon1234 May 11, 2015 20:13

How to initialize stratified temperature profile in a rectangular tank
 
Hi,
I am working on destratification process in a tank.Air bubble plume is used to destratify.
My tank dimension is 1.44X1.44X1.12. I want to study this process by using k-e turbulence model. However, I wanted to initialize the domain with stratified non linear temperature profile through out the domain. Kindly advise me the procedure to initialize it.

Thank you in advance.

ghorrocks May 12, 2015 06:49

Use a CEL expression or a 1D interpolation function to define the initial stratification profile as an initial condition.

MJ1234 June 11, 2015 14:47

I am trying it for rectangular domain as well. I have tried to put it as CEL function. But it is showing dimension unmatched?
Could you suggest me an example?

ghorrocks June 11, 2015 18:41

CEL requires the units to be correct for it to be a valid expression. You obviously have not got the units correct. Post the CEL expression and we will have a look at it.

moon1234 June 11, 2015 18:54

The expression I want to put in is Temperature (T) = T*(1-tanh(2*(z-h)/h)
here h = depth of tank
z = varying depth
tanh(x) = exp(x)-exp(-x)/exp(x)+exp(-x)

I am getting following error
Bad expression value 'temperature' detected in parameter 'Buoyancy Reference Temperature' in object '/FLOW:Flow Analysis 1/DOMAIN:Default Domain/DOMAIN MODELS/BUOYANCY MODEL'.
CEL error:
The dimensions of the argument to function 'exp' are inconsistent with expected dimensions.
Argument dimensions resolve to 'm'; expected '<dimensionless>'.

Kindly help

Opaque June 11, 2015 20:09

Could you please your CEL section as it stands in the software ?

If tanh(x) defined anywhere, or built-in ? or you simplified the expression for us.

I think you meant as follows

DimlessDepth = (z - h ) / h

Code:

  DimlessDepth =2*(z - h ) / h
  MyTempDist = MyTrefValue *(1 - (exp(MyDimlessDept)-exp(-Same))/(exp(Same)+exp(-Same))

In any case, the expression you are using will not work for the Buoyancy Reference Temperature since it MUST BE a single valued expression for the region. It cannot be a distribution since it will not be compatible with implementation as described in the documentation.

moon1234 June 18, 2015 10:51

Quote:

Originally Posted by Opaque (Post 550020)
Could you please your CEL section as it stands in the software ?

If tanh(x) defined anywhere, or built-in ? or you simplified the expression for us.

I think you meant as follows

DimlessDepth = (z - h ) / h

Code:

  DimlessDepth =2*(z - h ) / h
  MyTempDist = MyTrefValue *(1 - (exp(MyDimlessDept)-exp(-Same))/(exp(Same)+exp(-Same))

In any case, the expression you are using will not work for the Buoyancy Reference Temperature since it MUST BE a single valued expression for the region. It cannot be a distribution since it will not be compatible with implementation as described in the documentation.

Thanks for your guidance.
However, I could not get your question on "Could you please your CEL section as it stands in the software ?".
Yes I simplified tanh(x). It is not built in function.

However my query is im DimlessDepth "h" is variable and it changes. Shoud I use step function or any other function to define it?

Kindly guide me. Thank you in advance.


All times are GMT -4. The time now is 12:09.