
[Sponsors] 
Buoyancy convergence  Increase gravity vector using CEL (aitern) 

LinkBack  Thread Tools  Display Modes 
November 20, 2017, 12:16 
Buoyancy convergence  Increase gravity vector using CEL (aitern)

#1 
New Member
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 4 
Hello,
i have a problem with a setup that comprises 2 domains: Hot air flowing through an insulated pipe (Domain 1) The pipe is cooled by natural convection (Domain 2) Due to complex geometry around the pipe, i get nonrealistic velocities (> Mach 800) in the natural convection domain after 1015 solver iterations. To improve convergence I would therefore like to apply the gravitational force in small steps using CEL (so i wouldn't have to do it by hand and can run the simulation overnight): NCzapplied = .981*(1+(1step(Iteraitern))+(1step(2*Iteraitern))+(1step(3*Iteraitern))+(1step(4*Iteraitern))+(1step(5*Iteraitern))+(1step(6*Iteraitern))+(1step(7*Iteraitern))+(1step(8*Iteraitern))+(1step(9*Iteraitern))) Iter is a constant of 50, so the gravitational vector increases from .981 m s^2 in 9 steps to 9.81 m s^2 over 450 solver iterations and then remains constant. CFX can plot the expressions just fine. My problem is now, I am getting the following Expression Error and I'm not sure wheter this is intended to be unavailable for the buoyancy model (and why?) or whether I am doing something wrong: Parameter 'Gravity Z Component' in object '/FLOW:Flow Analysis 1/DOMAIN:Air/DOMAIN MODELS/BUOYANCY MODEL' has been assigned an expression that references the following unavailable variables: aitern Any help would be much appreciated! 

November 20, 2017, 18:19 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 15,144
Rep Power: 115 
Thanks for providing the background for this question. The background confirms that your question is a classic XY question (http://xyproblem.info/). In other words, your question is how do I implement gravity as a function of iteration number; but the real problem is how do I get this simulation to converge.
I would not recommend implementing variable gravity as a good solution to this problem. I am pretty sure it won't help anyway. Your problem is going to be more fundamental than that, so you need to find the fundamental problem rather than introducing the fundamental problem slowly. First of all, please check the basics on these FAQs on convergence: https://www.cfdonline.com/Wiki/Ansy...gence_criteria and https://www.cfdonline.com/Wiki/Ansy...do_about_it.3F If that does not work please post images of what you are modelling, your mesh and your CCL. 

November 21, 2017, 03:06 

#3 
New Member
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 4 
I appreciate your answer, however ramping up the bouyancy by hand in small steps runs the simulation just fine  maybe i should've added that information right away.
that's why I asked if/why it is not possible to use aitern as gravity component for the buoyancy model? 

November 22, 2017, 23:54 

#4 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 15,144
Rep Power: 115 
I am not completely sure why you cannot make gravity a function of aitern. Variable gravity will introduce new terms in the equations which have not been included in CFX. But if CFX has made a certain option not available there will be reason for it (I just don't know what it is).
A better approach might be to ramp up the temperature or flow rate rather than ramping gravity. 

November 23, 2017, 08:05 

#5 
New Member
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 4 
my problem is the entire domain is driven only by natural convection due to the hot surface resulting from heat transfer from the pipe with the throughflow, so gravity is the only value that i could change in that domain...
Thinking of it, the surface temperature should be independent of the mass flow in a stationary simulation, as there will just be less natural convection induced... i will give this a try. 

November 27, 2017, 10:42 

#6 
Senior Member
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 353
Rep Power: 9 
Instead of aitern why can't you just use the variable, time?
In steady state it should use the false pseudo time, and in transient it should use the transient time. You can achieve this using a simple user function. Step 1) create a new user function called RampGravity Step 2) set the argument units to [s] and the resultant units to [m/s^2] Step 3) Set coordinate 0 and value 0 Step 4) Set coordinate 20 and value 9.81 Step 5) Set coordinate 21 and value 9.81 Step 6) Select "extend min" and "extend max" Step 7) Apply and close the menu Step 8) Create a new expression called MyRampGravity Step 9) Set the definition of MyRampGravity to RampGravity(t) Step 10) In your domain setup set your gravity to the expression MyRampGravity Tip: in the expression MyRampGravity you can plot the curve/ramp if you want to see what it looks like. Tip 2: in step 6 "extend max" is crucial, otherwise after 21 [s] g = 0 [m/s^2] Tip 3: see if my method works when you replace time with aitern Tip 4: post outcome of your energy and mass balance...you have done this right? Tip 5: use equation 152 to estimate your time step, and then reduce it by an order of magnitude (https://www.sharcnet.ca/Software/Ans.../i1313401.html) Tip 6: you can under relax the energy equation by using the temperature damping function I'm assuming your mesh quality, CFX setup and everything else is perfect 

November 28, 2017, 19:25 

#7 
New Member
Join Date: Dec 2016
Posts: 8
Rep Power: 3 
Are you using CFX5 standalone or in a version of Workbench? If you are sure that you will achieve convergence via slowly ramping gravity, there are a few Workbench tools that could help you automate this.
Eg. you could set your gravity expression as a Workbench Parameter and while using the previous solution as initial conditions run design point updates from 0.1g to 1.0g. Alternatively if you don't enjoy Parameters you could have several Workbench CFX Modules feeding their results into the initial conditions of the next one. If you are using CFX5 on linux you should be able to bash script something similar with CFXPre macros. 

Tags 
buoyancy stepwise cel 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Ok to increase gravity gradually from 0 to 9.82?  Admo  FLUENT  3  February 23, 2012 11:43 
tips to speedup the convergence of CHT problem with gravity  derisala  FLUENT  1  February 24, 2011 03:28 
(chtMultiRegionFoam) reducing gravity increase the simulation time !  openfoam1  OpenFOAM  7  March 10, 2010 10:41 
Convergence of CFX field in FSI analysis  nasdak  CFX  2  June 29, 2009 02:17 
structured grid and/or increase convergence rate  Ashish Pande  FLUENT  0  May 12, 2006 04:36 