|
[Sponsors] |
February 2, 2020, 23:58 |
CFX Solver Error: return code 255
|
#1 |
New Member
Join Date: Aug 2019
Posts: 14
Rep Power: 7 |
Hello,
I'm having difficulty determining the cause of an Ansys CFX solver error. Errors Workbench error message: The solver failed with a non-zero exit code of : 2 Out error message: The ANSYS CFX solver could not be started, or exited with return || code 255: Note A prior run failed to start. As a result, the "topology estimate factor" is set to 1.2 as suggested by that error message. Simulation Background While a steady solution is sought, the simulation is run as transient. This is done to gain understanding of time marching behavior to a steady state solution and the effect of timestep selection. As a result, transient accuracy of the solution is not of concern and only one coefficient iteration is performed per timestep. I've attached and image of the residuals monitor and the OUT file. Thank you |
|
February 3, 2020, 00:45 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
There is nothing obvious to cause that error. I would recommend doing some basic debugging - remove the complex bits of your simulation one at a time until it starts running. For instance, replace your functions with constant values. Also, I would save a backup file just before it crashes and have a look at it in the post processor. That might give you a hint of where the problem is.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 3, 2020, 04:05 |
|
#3 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
1) Why do you have a maximum of 1 coefficient loops per time step? And a convergence criterium of 1E-10?
With a maximum of 1 coefficient loops per time step, you expect CFX to reach this convergence criterium in 1 iteration per timestep. You can demand a lot from CFX, but this is a bit overdone. I would stick to the default of 10 as a start. And 1E-10 is extremely thight. I would start with 1E-4. 2) I would not set initial conditions for turbulent parameters. I would set them to automatic only. 3) Add more monitoring points where you monitor pressure, velocity, tke and ted. (Not only 1 point where you monitor Absolute Pressure.) This allows you to see how CFX behaves during the calculation. 4) What about the imbalances? Monitor them as well, to see what comes in equals what goes out...... |
|
February 3, 2020, 17:29 |
|
#4 |
New Member
Join Date: Aug 2019
Posts: 14
Rep Power: 7 |
Thank you both for your helpful replies.
Glenn I've reduced the mesh resolution from 12 million cells to 1.2 million. The solver is now stable. I'm not sure what conclusion to draw from this. Gert-Jan 1) As I'm not concerned with transient accuracy, I see it more efficient to perform one coefficient iteration per timestep (i.e. one coefficient iterations and timestep of 6E-03 rather than 10 coefficient iterations and timestep of 6E-02). It is my understanding this is the procedure CFX takes when one selects steady-state. I agree 1E-10 is extremely tight, I wanted the solver to run until I got back to it to see where it ended up. 2) I was instructed to set these initial conditions. I should hope this would only effect the number of iterations and not the result itself. 3) I will add monitoring points 4) Another good suggestion, thanks |
|
February 3, 2020, 17:54 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
Finer meshes have less numerical dissipation and are less numerically stable. So coarsening the mesh will make it more stable. Also you are reducing the Courant number of the simulation so it is happier with your large time step.
Your answer (1) to Gert-Jan's is misguided. * CFX only adds the second order transient components to the simulation after the second coefficient loop. So you are not getting any second order contribution. * CFX is most efficient when doing 3-5 coefficient loops per iteration, not 1. * You must converge to a reasonable residual or your results will be rubbish. Limiting the solver to one coeff loop per iteration means it cannot do this, your residuals will be very poor and therefore your simulation accuracy will be rubbish. * Your residual tolerance of 1E-10 is irrelevant. It will never get there with one coefficient loop. * Where has your time step size of 6E-3 came from? Unless that came from a sensitivity study then your time step is bound to be far too large as well, compounding the problem. The recommended approach is: * Set the convergence criteria to a reasonable tolerance, maybe 1E-4 or 1E-5. * Set the max coeff loops per time step to 10, don't define a minimum. * For time step settings, use adaptive time steps, homing in on 3-5 coeff loops per iteration. Make sure the max and min time step size are wide enough it never hits them. Also set a reasonable initial time step. This approach allows the solver to find its own settings pretty quickly. And minimises the amount of sensitivity studies you need to do to define things such as time step size.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 3, 2020, 19:44 |
|
#6 |
New Member
Join Date: Aug 2019
Posts: 14
Rep Power: 7 |
Again, your advice is very helpful
1) I was under the impression solution divergence wasn’t the cause of the solver crash because the residuals were declining (image given in initial post). Am I wrong here? 2) As the resulting flow is steady, don’t all d(phi)/d(t) terms and their associated truncation error go to zero. I don’t see how second order in time is of use here. 3) The timestep of 6E-02 was what Auto Timescale CFX arrived upon in another run with the “Analysis Type” set to steady state. I’m trying to mimic CFX here in an effort to learn. The CFD Online Ansys FAQ says “Use a larger physical time step. A time step approximately equal to the average residence time in the simulation domain is a good guide for most simulations.” The residence time of my simulation is on the order of 0.03s. I don’t see how I could be using too large a timestep. 4) I couldn’t agree more with the recommended approach you outlined for a seeking a transient solution. Would you still recommend this approach if only the final, steady solution is sought? Thank you |
|
February 4, 2020, 01:00 |
|
#7 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
1) It is unusual, but not impossible, to crash when the residuals are declining. Don't forget the residuals are just one measure of convergence so it appears what is causing your divergence is not picked up in the residuals. You might need imbalances (or something else?) to pick up this divergence.
2) I made the comment about second order time differencing because you have second order time differencing set in your output file you posted. 3) The auto timescale function just works out a guess which can be massively wrong. It is a starting point which you adjust depending on how the simulation proceeds from there. 4) If all you are looking for is the final steady solution then why don't you use a steady state simulation? I see in your first post you are trying to understand time marching behaviour, but using poorly converged time steps to march to a steady state solution is going to be a challenging thing to understand. If the purpose is to understand convergence to steady state better then I recommend you do a run using the recommended transient settings which converge properly each time step. Then you will see how fully converged time steps converge to steady state. That will give you a good baseline to compare how unconverged time steps converge to steady state - or if the non-convergence is poor, then they diverge and crash.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 4, 2020, 03:01 |
|
#8 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
1) That CFX gives an error does not imply your solution is diverging. If it diverges, then ususally you see things like 'F', 'NaN', '*' in the linear solver and FINMES, FPX messages, etc. as final statements.
Now it just gives a error code. Probably it has to do with your strange approach of obtaining a solution (to understand how CFX works), large timestep, initial condition, something else...... 3) If you already have a steady state solution, what average values for TKE and TED do you see? Aren't these values a better indication for an initial guess? Alternatively, why don't you interpolate this existing solution as a initial guess? |
|
February 4, 2020, 15:53 |
|
#9 |
New Member
Join Date: Aug 2019
Posts: 14
Rep Power: 7 |
Glenn
1) I’ve copied the Workbench file to another computer and it ran without error. Nothing was altered in the setup aside from the Inlet profile directory locations. This leads me to conclude divergence was not the issue here. I’m still in the dark as to what caused the error. 2) Good point, I neglected to change second order differencing from a previous model. This selection ends up null so no harm done. 3) Understood, dialing in an appropriate timestep is an iterative procedure. 4) When steady-state (with physical timestep) is selected, does CFX alter the computational model in ways other than limiting to one coefficient iteration per timestep? It’s my understanding the same discretized equations are applied to steady-state and transient runs and the option to select between the two is in an effort to make the software friendly for the end user. “For steady-state problems, the time-step behaves like an ‘acceleration parameter’, to guide the approximate solutions in a physically based manner to a steady-state solution” - CFX Solver Theory Guide “Only one inner (linearization) iteration is performed per outer iteration in steady-state analyses” - CFX Solver Theory Guide Gert-Jan 3) Good point, I will use prior runs to initialize the next in future work. I was initializing each model V = 0 in an effort to determine what timestep gets to steady state fast & reliably. Thank you both for your advice |
|
February 4, 2020, 18:04 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
4) Steady state simulations in CFX are done by a psuedo-time step. It is not a real time step. A few transient terms are neglected and you can advance different equations at different time steps - as all which is important is the final converged solution, not how you got there. So you cannot equate a steady state psuedo-timestep to a transient simulation actual time step. Also it does not equate to one coeff loop per time step in a transient simulation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 5, 2020, 15:49 |
|
#11 |
New Member
Join Date: Aug 2019
Posts: 14
Rep Power: 7 |
4) Could you provide links to additional material on CFX’s implementation of timesteping for steady state solution. I’ve referenced the CFX documentation and Michael Raw’s 1995 & 1996 papers detailing the CFX-TASCflow solver.
I understanding each region of the domain (“Local Timescale”) and each equation (mass, mom_x, mom_y, etc.) can be advanced with varying timesteps. Specifically, I’m seeking to understand what transient terms are neglected and whether any other alterations are made when steady state is selected. I’d like to implement lessons learned in my unstructured FV NS code. Thank you |
|
February 5, 2020, 18:12 |
|
#12 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
You have already read the best references then, I have no more.
If you search the forum you will find some more on this topic. But keep in mind CFX is a commercial solver and they don't release all the details of how it works. They especially don't want people copying their technology - so they deliberately make that difficult. In other words, unless you become an employee of ANSYS you are not going to get the full details of how everything works. They publish enough so you get the general idea, but not the specific details.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Help with element size | sandri_92 | ANSYS Meshing & Geometry | 14 | November 14, 2018 08:54 |
Error code 255 | ROY4 | CFX | 34 | June 20, 2018 03:16 |
CFX Solver Manager Error Code 1 | Peta247 | CFX | 3 | June 4, 2016 12:00 |
The ANSYS CFX solver exited with return code 1. No results file has been created | moodkiller | CFX | 7 | May 23, 2016 03:16 |
CFX error code 255 | SamerAli | CFX | 3 | July 13, 2013 08:25 |