CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Treatment of Boundary Conditions (https://www.cfd-online.com/Forums/cfx/24367-treatment-boundary-conditions.html)

Harun August 6, 2007 07:21

Treatment of Boundary Conditions
 
How are boundary conditions imposed in CFX?

Are they imposed explicitly or implicitly?

Is there extrapolation of any sort at the boundaries? (eg. zero order extrapolation at inviscid wall, or extrapolation of static pressure from nearest node from Total pressure specified inlet to calculate velocity using theory)

If the mass flow option is selected, how often will CFX update the boundary? The same goes for average static pressure and total pressure.

Look forward to your views.


Glenn Horrocks August 6, 2007 19:26

Re: Treatment of Boundary Conditions
 
Hi,

BCs are implicit.

Extrapolation and your other questions are discussed in the documentation.

Glenn Horrocks

Robin August 7, 2007 11:39

Re: Treatment of Boundary Conditions
 
Boundary conditions are applied implicitely at IP faces and because CFX locates control volumes around boundary nodes, extrapolation is not necessary.

-Robin

brunoc August 8, 2007 14:18

Re: Treatment of Boundary Conditions
 
Hi Robin,

Yes, BCs are imposed implicitly at IPs. That is easy to understand if you are setting flux BCs, since then you are just saying the IP flux is the value you prescribed.

But what about prescribing the value of a given scalar phi (say temperature at a wall)? Won't the solver will still need to know grad(phi) at the boundary?

Ok, you can get grad(phi) from shape functions derivatives. But that means you would have to know the values at the element nodes. Now, since some of these nodes are at the boundary, they are variables of the problem (unknows).

So how is it done exactly? Does CFX assume phi at the boundary nodes to be equal the values prescribed just to compute the gradient? Because this would mean that values are actually imposed at nodes, not IPs.

I'm sorry if the answer for this is straightforward. I'm just not getting the picture on how it works.

Thanks in advance.


Bak_Flow August 10, 2007 00:14

Re: Treatment of Boundary Conditions
 
Brunoc,

yes you are onto the right idea! It depends upon the boundary condition as to how active or lagged it is. Even the turbulent wall function...which really is just a nonlinear relationship between tangential velocity in the near wall cell and shear stress winds up being lagged in CFX!

What you probably need to do (if this is important to you?) is to list out the specific boundary conditions you want and have one of the CFX developers explain how it is actually implimented. CFX has a lot of things nicely implimented for certain boundary conditions...like the mass flow outlet for doing cavitation on a pump, etc...but not everything is all that implicit!! ;-)

You have to be very careful with responses like Robin's .... those oversimplifying sales type replies....... can get you into trouble on a really hard problem!

Let us know more about your specifics and see if we can help.

Regards,

Bak_Flow

HekLer August 10, 2007 12:58

Re: Treatment of Boundary Conditions
 
This question requires a long answer, but I'll give a couple of examples for a dirchlet type condition.

The solver evaluates the flows (advection, diffusion, etc..) through each boundary integration point. There is no extrapolation used to evaluate these.

If the value is specified at the boundary then what is done with that depends both on the type of boundary condition (inlet, outlet, wall, etc...) as well as the type of flow being evaluated (advection, diffusion, mass flow, stress, etc...).

For diffusion:

- walls (eg: laminar conduction, or diffusion of a scalar) the dependence of the boundary flow on the wall nodes are multiplied out by the specified value when we evaluate the RHS. The active dependence on the boundary node is zeroed, so it's explicit.

- inlet BCs do not usually do this because we assume, by default, that the advection flows dominate. The wall diffusion closure can be activated with an expert parameter, or if you solve an equation without an advection term (eg: diffusive or poisson AV) then we do the same as a wall.

For advection (only relevant to inlets really):

- advective flows carry in the local specified values. i.e. mdot*value_spec.

For pressure gradient:

- for inlets we treat it like a diffusion term at a wall. i.e. substitute the boundary dependence and lag it. Unless there is an "artificial wall", in which case we do like we do at a wall bc - for walls we do nothing, just leave the local dependence on the wall node fully active.

Make sense?

HekLer August 10, 2007 13:11

Re: Treatment of Boundary Conditions
 
To answer your questions... but also see my other post. Most of this is in the documentation BTW.

* How are boundary conditions imposed in CFX?

- It depends on the boundary condition and type of flow being evaluated.

* Are they imposed explicitly or implicitly?

- It's usually explicit, i.e. the boundary flows are lagged, or put into the RHS.

* Is there extrapolation of any sort at the boundaries?

- Not when we evalute boundary condition flows. We have a vertex right on the boundary so there is no need to do this.

* If the mass flow option is selected, how often will CFX update the boundary?

This is a bit involved, but here goes...

The mass flow distribution through the boundary condition ultimately results from the solution of pressure and velocity at the outflow boundary nodes. Presure and velocity are updated each coefficient loop after the linear solution. Also, right after the linear solution, we update the mass flow profile using the latest presure and velocity solution values. The mass flow distribution, estimated from the current pressure and velocity values, is updated by a scaling factor to exactly satisfy your specified value.

* The same goes for average static pressure

The average pressure of the boundary nodes is computed each coefficient loop. The boundary substition for the pressure gradient term is performed with a local adjustment at each node to force the average pressure to the specified average: p_ip = p_node + (p_ave_specified - p_ave_node_current). This is what we substiute each coefficient loop.

* and total pressure.

For the simple case of incompressible flow we get p for the pressure gradient calculation from "P_total_specified - 0.5 * rho * v_last_iteration^2". This is more complicated for ideal/real gas because you cannot directly use the incompressible Bernoulli's law.


brunoc August 10, 2007 13:36

Re: Treatment of Boundary Conditions
 
Thanks for your reply.

It's just that I always "knew" that the BCs on CFX were imposed at IPs. But once I gave it some thought it became a bit hard to understand exactly how it was done for the case of a prescribed quantity. And I'm not even talking about the implementation of it (I agree with Robin that this is a job for masochistic developers).

The way I see it, although CFX solves equations for nodes at BCs, these equations (in the case of prescribed quantities) do not account for the values of its surrounding BC nodes since they are theoretically known. These terms would be inserted kind of as source terms when obtaining the IP flux.



All times are GMT -4. The time now is 20:41.