CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Buoyancy convergence - Increase gravity vector using CEL (aitern)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2017, 11:16
Default Buoyancy convergence - Increase gravity vector using CEL (aitern)
  #1
New Member
 
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 9
TwoShaft is on a distinguished road
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 non-realistic velocities (> Mach 800) in the natural convection domain after 10-15 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+(1-step(Iter-aitern))+(1-step(2*Iter-aitern))+(1-step(3*Iter-aitern))+(1-step(4*Iter-aitern))+(1-step(5*Iter-aitern))+(1-step(6*Iter-aitern))+(1-step(7*Iter-aitern))+(1-step(8*Iter-aitern))+(1-step(9*Iter-aitern)))

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!
TwoShaft is offline   Reply With Quote

Old   November 20, 2017, 17:19
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.cfd-online.com/Wiki/Ansy...gence_criteria and https://www.cfd-online.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.
ghorrocks is offline   Reply With Quote

Old   November 21, 2017, 02:06
Default
  #3
New Member
 
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 9
TwoShaft is on a distinguished road
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?
TwoShaft is offline   Reply With Quote

Old   November 22, 2017, 22:54
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   November 23, 2017, 07:05
Default
  #5
New Member
 
Nicolas Neuburger
Join Date: Jun 2016
Posts: 3
Rep Power: 9
TwoShaft is on a distinguished road
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.
TwoShaft is offline   Reply With Quote

Old   November 27, 2017, 09:42
Default
  #6
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 14
JuPa is on a distinguished road
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 15-2 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
JuPa is offline   Reply With Quote

Old   November 28, 2017, 18:25
Default
  #7
New Member
 
Join Date: Dec 2016
Posts: 8
Rep Power: 9
bcade is on a distinguished road
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 CFX-Pre macros.
bcade is offline   Reply With Quote

Reply

Tags
buoyancy stepwise cel


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 10:43
tips to speedup the convergence of CHT problem with gravity derisala FLUENT 1 February 24, 2011 02:28
(chtMultiRegionFoam) reducing gravity increase the simulation time ! openfoam1 OpenFOAM 7 March 10, 2010 09:41
Convergence of CFX field in FSI analysis nasdak CFX 2 June 29, 2009 01:17
structured grid and/or increase convergence rate Ashish Pande FLUENT 0 May 12, 2006 03:36


All times are GMT -4. The time now is 11:16.