CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Patching initial conditions (https://www.cfd-online.com/Forums/cfx/154304-patching-initial-conditions.html)

fluidmechanics June 11, 2015 06:39

Patching initial conditions
 
Dear All;

I have created a single domain in my mesh, but now I want to initialize a particular region different with other cells. In other words, I want to know if there is an option in CFX 14.5 or 15 to mark a region (with coordinates) and patch it with different values as initialization (just like Fluent), without need to create two distinct zones in the primary mesh.

Cheers

J.M

Opaque June 11, 2015 08:09

You can use CEL to bound the region you want to initialize.

If the region you want to initialize is already a mesh region, i.e. there is name to group all the element in such space, you can easily use the "inside()@mesh region" function.

For example,

Pressure = 10 [Pa] * inside()@Front Pipe + 20 [Pa] * inside()@Back Pipe

where


inside()@Front Pipe = 1 within Front Pipe
= 0 outside Front Pipe

inside()@Back Pipe = 0 outside Back Pipe
= 1 within Back Pipe

If you want to use coordinates, you can use the CEL "step( expression )" function.. You can search the forum for several examples using "step" (similar to inside but "expression" can be nearly anything you want)

May I ask why do you need specific initialization per region ? Multiphase free surface flow ?

Recall that ANSYS CFX and ANSYS Fluent have different behaviors and some practices do not translate directly, and may not be needed when switching codes.

fluidmechanics June 12, 2015 14:23

Thanks Opaque;

I am going to simulate discharge phenomenon of a pressurized vessel into ambient. I wanted to know if I can patch vessel pressure in its' coordinates without creating two different zones and applying interfaces.

ghorrocks June 13, 2015 06:14

In fact you definitely should use an initial condition which defines the flow and not use multiple domains.

There are many ways you can do this.
if(x>4[m],1[bar],0[bar])
step((x-4[m])/1[m])*1[bar]

Or you can use 1D interpolation functions with X, Y or Z or some function of XYZ as the input variable.


All times are GMT -4. The time now is 15:00.