CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   How to apply gravity to flow in CFX? (https://www.cfd-online.com/Forums/cfx/19734-how-apply-gravity-flow-cfx.html)

Miko June 29, 2003 20:48

How to apply gravity to flow in CFX?
 
Hi all!

I have to consider the effect of gravity, but I don't know how. Can anybody tell me how to put it into practice? Thank you!

Best regards!

Miko

zahid June 29, 2003 21:21

Re: How to apply gravity to flow in CFX?
 
Hi Miko In order to incorporate gravity effects you will have to choose the flow to be buoyant. Then you can specify the gravity components.

Miko June 29, 2003 23:05

Re: How to apply gravity to flow in CFX?
 
Hi Zahid!

Yes, but when I want to enable buoyant, it seems that only if domain model is multiphases or the fluid temperature is not constant the option is available. But what I need is only gravity, and I can ignore the change of temperature. What should I do? Thank you!

Best regards!

Miko

Bob June 30, 2003 08:38

Re: How to apply gravity to flow in CFX?
 
Miko, what exactly are you trying to model ? If you could give a little more detail then I'm sure people would be able to help. Bob

Louwrens June 30, 2003 10:38

Re: How to apply gravity to flow in CFX?
 
Because buoyancy is temperature and pressure dependent, you can't enable buoyancy when your fluid is isothermal.

unless your flow is high-speed, use the thermal energy heat tranfer model. This will enable you to activate buoyancy and specify the gravity vector. Since you don't care about the temperature of the fluid, just specify the inlet temperature and make sure your boundaries are adiabatic.

centaur_ks June 30, 2003 10:43

Re: How to apply gravity to flow in CFX?
 
u mean u dont want to solve energy eqn and wants the flow to be isothermal but still u want to specify gravity component.

if this is the situation, then when u specify let it take non-isothermal thing, but u can always modify parameter file. like in CFX-TASCflow, if you specify TMPTRE = F in parameter file then inspite of specifying temperature change in GUI during problem specification, solver wont solve temperature and it would assume constant temperature.

J-

Miko June 30, 2003 21:40

Re: How to apply gravity to flow in CFX?
 
Dear Zahid, Bob, Louwrens and Centaur_ks,

Thank you all for giving me suggestion. In fact, what I am modeling is duct flow. The fluid is liquil metal, and besides Lorentz force concerned, I have to consider the effect of gravity. Liquid metal is single phase, so I needn't two or more phase. The physical image is as followed:

liquid metal whose conductivity (denoted by c) is 2.878E+6 (ohm^-1 m^-1), flows in the insulator duct along Z axle, and the direction of external magnetic field (denoted by B) is X axle. We can know that in the Momentum equation Lorentz force Z component is -c*B^2*w and Y component -c*B^2*v where w and v mean the value of velocity along Z and Y axle, respectively, and B is equal to 1 (T). As for gravity, its form is density*g and direction is -Y axle.

In CFX, in order to add body force, I use CEL to creat values and expressions. For instance, I created bodyforce_z=-c*B^2*w and bodyforce_y=-c*B^2*v-density*g with CEL, then I created a Fluid Subdomain named Bodyforce, enabled source of momentum in the subdomain, and specified it in the following way:

Momentum: x-comp 0 kg m^-2 s^-2

Momentum: y-comp bodyforce_y

Momentum: z-comp bodyforce_z

After doing this, I run Solver, but I found it's difficult to converge. Can somebody give me some guideline and tell me how to add body force properly?

Volker Göke July 4, 2003 04:03

Nearly the same problem as my one
 
Actually, I try to implement gravity to my diffusion-convection problem - without this force, the solver converges - with gravity - no chance at the moment. Let's wait and see - maybe I can give You an advice tomorrow.

Miko July 4, 2003 04:10

Re: Nearly the same problem as my one
 
Hi Volker!

How did you implement the gravity? I think if the gravity is the only body force should be considered, it's easy. The only thing you should do to do is to creat a Fluid Subdomain and enable the Momentum source. You can use CEL or input the value of gravity there directly, I think.


Phil July 4, 2003 12:11

Re: How to apply gravity to flow in CFX?
 
Miko:

If you have a single-phase constant-density flow, gravity is irrelevant and can be excluded from the simulation. The pressure then represents the 'motion pressure' which drives the flow. If for whatever reason you really want to include it, you can trick CFX into doing so by defining your density to be an expression, eg, 'Density = C*T/T', where C is the density you want. This will allow you to activate the buoyancy model. The interpretation of pressure then depends on your choice of buoyancy reference density; if you choose C, then you get exactly the same answer as if you excluded gravity. If you choose something other than C, then pressure will have a hydrostatic variation imposed on it. To get decent convergence, you will need to set pressure initial/boundary conditions which include the effect of this linear gradient.

Miko July 8, 2003 05:33

Re: How to apply gravity to flow in CFX?
 
Hi Phil!

Thank you! I think your suggestion is so useful. If gravity doesn't influence the velocity profile of the fluid when the fluid flows horizontally and gravity is vertical , I can ignore it. Right?

Vishnu_bharathi November 21, 2017 12:03

Quote:

Originally Posted by Phil
;66806
Miko:

If you have a single-phase constant-density flow, gravity is irrelevant and can be excluded from the simulation. The pressure then represents the 'motion pressure' which drives the flow. If for whatever reason you really want to include it, you can trick CFX into doing so by defining your density to be an expression, eg, 'Density = C*T/T', where C is the density you want. This will allow you to activate the buoyancy model. The interpretation of pressure then depends on your choice of buoyancy reference density; if you choose C, then you get exactly the same answer as if you excluded gravity. If you choose something other than C, then pressure will have a hydrostatic variation imposed on it. To get decent convergence, you will need to set pressure initial/boundary conditions which include the effect of this linear gradient.


Hi Phil, In the case of my fluid density varying over temperature, How do I avoid hydrostatic variation imposed when activating buoyancy model? I can give only one value for ref. buoyancy density but my fluid density is temperature dependent. I see (rho - rho_ref)g as the formula of the source term when we activate buoyancy model.

ghorrocks November 22, 2017 22:43

This thread is 14 years old. Phil is long since deceased.

But I can answer your question. If you have variable density then you inherently will have issues dealing with the hydrostatic component as the reference density cannot remove it. This is a fundamental implication of using variable density in a buoyant simulation.

You are going to have to ensure that your simulation can handle the fact that the hydrostatic component will remain to some extent. This may affect your choice of boundary conditions.

Vishnu_bharathi November 23, 2017 03:05

Quote:

Originally Posted by ghorrocks (Post 672541)
This thread is 14 years old. Phil is long since deceased.

But I can answer your question. If you have variable density then you inherently will have issues dealing with the hydrostatic component as the reference density cannot remove it. This is a fundamental implication of using variable density in a buoyant simulation.

You are going to have to ensure that your simulation can handle the fact that the hydrostatic component will remain to some extent. This may affect your choice of boundary conditions.

Sorry, I did not know about Phil. "This may affect your choice of boundary conditions" - I think it is. My simulation works well without buoyancy with BC at outlet to relative static pressure to '0' but when I activate buoyancy the simulation has issues with the velocity streamlines at 'outlet'. Does static pressure at outlet not a good consideration when activating buoyancy? I use mass flow at Inlet BC for either case.

ghorrocks November 24, 2017 04:09

Oh yes, you posted on that other thread on the streamlines at the outlet.

You had not correctly implemented the buoyancy reference condition if I remember correctly, so the hydrostatic component was not removed properly and was causing the strange streamlines. If you corrected your buoyancy model it should work.

Vishnu_bharathi November 29, 2017 15:17

Hi. Update: I could'nt fully resolve or remove the hydrostatic terms influence on the streamline. I could not adapt the reference buoyancy density to neutralize this term (rho - rho_ref)g. However I tried the simulation with deactivating it and it dosent have problem so I reduced my fluid region in a way it does not influence the result. Thank you for the suggestions. I appreciate it :)


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