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

The ANSYS CFX solver exited with return code 38

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 1 Post By AtoHM
  • 1 Post By Gert-Jan
  • 1 Post By Gert-Jan
  • 1 Post By Gert-Jan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2021, 06:26
Default The ANSYS CFX solver exited with return code 38
  #1
New Member
 
Pascal Schmitt
Join Date: Mar 2021
Posts: 5
Rep Power: 3
shmitzps is on a distinguished road
Hello everyone,


I am trying to simulate a cooling channel with air being the working fluid in Ansys CFX. The heat is provided by a heat source being installed at a segment of the channel. The purpose of this simulation is the validation of the RANS simulation in a specific context which I don't want to explain further.


When I try to run the simulation, it always stops at a certain number of iteration around 80 and tells me "The ANSYS CFX solver exited with return code 38". In the following example, the solver reached the 96th iteration before returning with an error code:
================================================== ====================
| Timescale Information |
----------------------------------------------------------------------
| Equation | Type | Timescale |
+----------------------+-----------------------+---------------------+
| U-Mom-Fluid | Auto Timescale | 2.87047E-04 |
| V-Mom-Fluid | Auto Timescale | 2.87047E-04 |
| W-Mom-Fluid | Auto Timescale | 2.87047E-04 |
| P-Mass-Fluid | Auto Timescale | 2.87047E-04 |
+----------------------+-----------------------+---------------------+
| H-Energy-Fluid | Auto Timescale | 2.87047E-04 |
| T-Energy-Solid Testc | Auto Timescale | 1.03401E+03 |
| T-Energy-Solid Heat | Auto Timescale | 3.92661E+01 |
+----------------------+-----------------------+---------------------+
| uu-RS-Fluid | Auto Timescale | 2.87047E-04 |
| vv-RS-Fluid | Auto Timescale | 2.87047E-04 |
| ww-RS-Fluid | Auto Timescale | 2.87047E-04 |
| uv-RS-Fluid | Auto Timescale | 2.87047E-04 |
| uw-RS-Fluid | Auto Timescale | 2.87047E-04 |
| vw-RS-Fluid | Auto Timescale | 2.87047E-04 |
| O-TurbFreq-Fluid | Auto Timescale | 2.87047E-04 |
+----------------------+-----------------------+---------------------+

================================================== ====================
OUTER LOOP ITERATION = 96 CPU SECONDS = 6.985E+04
----------------------------------------------------------------------
| Equation | Rate | RMS Res | Max Res | Linear Solution |
+----------------------+------+---------+---------+------------------+

+--------------------------------------------------------------------+
| An error has occurred in cfx5solve: |
| |
| The ANSYS CFX solver exited with return code 38. No results file |
| has been created. |
+--------------------------------------------------------------------+

End of solution stage.


Sometimes I returns with the same error code, but at least it creates an result file even though I just changed the minImum number of iterations from 50 to 200.



I tried to define some material properties as a constant number instead of a function, but nothing worked, it still stops with the same return code.
My variables to watch do not converge unfortunatlly which means the simulation results are not useable. These are my criteria:
CONVERGENCE CRITERIA:
Conservation Target = 1e-3
Residual Target = 1e-6
Residual Type = RMS

After some research, I coundn't find existing threads about this topic. Has anyone experienced the same problem or does anyone have a clue what caused the problem ??



If I provided too little information about my problem, then please let me know, I am still a CFX beginner.
shmitzps is offline   Reply With Quote

Old   March 12, 2021, 04:43
Default
  #2
Senior Member
 
M
Join Date: Dec 2017
Posts: 481
Rep Power: 9
AtoHM is on a distinguished road
The error codes are basically useless. The full .out file will be more helpful, if you could attach that.

Whenever I run into something like that and cant find an obvious mistake, I try to run the case again and see if i can get output of the iteration before the one that fails, to see whats going on.
aero_head likes this.
AtoHM is offline   Reply With Quote

Old   March 12, 2021, 05:55
Default
  #3
New Member
 
Pascal Schmitt
Join Date: Mar 2021
Posts: 5
Rep Power: 3
shmitzps is on a distinguished road
Thanks for your quick answer!

Okay, I already looked a little bit at the results in CFX-Pre, if the solver created one, but nothing conspicuous was visable. I will check CFX-Pre more, maybe I overlooked something.

I also attached the .out file of the mentioned sover run.
Attached Files
File Type: zip Outfile.zip (23.6 KB, 2 views)
shmitzps is offline   Reply With Quote

Old   March 12, 2021, 06:44
Default
  #4
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,643
Rep Power: 25
Gert-Jan will become famous soon enough
You use polynomial functions for cp and labda. But these are unbounded. That is a bad idea.
I guess that during the iteration process, your temperature becomes much higher or lower than you expect. Then this will result in unexpected (maybe negative???) values for labda and cp. Therefore you should bound them at minimum and maximum side. Something like:

cp = max(2000 [J/kg/K]; min(500 [J/kg/K]; cp(T) ))

So, you make sure that cp will always have realistic values between 500 and 2000 J/kg/K. Values are just an example......

Remember, in Pre you can evaluate the functions that you define in a graphical way, making sure that in the range of temperatures you will obtain realistic values.
aero_head likes this.
Gert-Jan is offline   Reply With Quote

Old   March 12, 2021, 07:55
Default
  #5
New Member
 
Pascal Schmitt
Join Date: Mar 2021
Posts: 5
Rep Power: 3
shmitzps is on a distinguished road
Like I said in my describtion above, if I define a constant cp and lamda , the simulation run will still stop with the same return code. So it seems that this cannot cause the problem.
But I will bound them anyway, because you are totally right. Thank you!
shmitzps is offline   Reply With Quote

Old   March 12, 2021, 08:55
Default
  #6
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,643
Rep Power: 25
Gert-Jan will become famous soon enough
If you look in the out file to this section, I see weird things:

+--------------------------------------------------------------------+
| Average Scale Information |
+--------------------------------------------------------------------+

Domain Name : Fluid

Global Length = 4.6197E+01
Density = 4.7498E-09
Velocity = 4.8997E+04
.....


Domain Name : Solid Heat Source
Global Length = 2.6400E+01
Density = 7.8540E-06
.....


Domain Name : Solid Testchannel
Density = 7.9600E-06
.....


So your density and velocity scale are weird.
Also, your monitoring points are on mm-scale, your length scale is multiple meters. Did you read in millimeters as meters?

In other words, there is something really wrong, but impossible to say what. I would make a back up after a few interations and then check the intermediate result in Post
aero_head likes this.
Gert-Jan is offline   Reply With Quote

Old   March 15, 2021, 07:59
Default
  #7
New Member
 
Pascal Schmitt
Join Date: Mar 2021
Posts: 5
Rep Power: 3
shmitzps is on a distinguished road
You're right that's really weird. Thanks for your help!

But actually i have no idea what causes the solver to use these values, because in CFX-Pre my density is defined properly. The value itself is kinda right, but it is just scaled to a lower power of ten than what I have defined before. Has anyone experienced a similar problem ?
shmitzps is offline   Reply With Quote

Old   March 15, 2021, 08:17
Default
  #8
Senior Member
 
Join Date: Jun 2009
Posts: 1,614
Rep Power: 29
Opaque will become famous soon enough
Check consistency between the units used to import the mesh, and the "Solution Units" selected for the calculation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
Opaque is offline   Reply With Quote

Old   March 15, 2021, 08:22
Default
  #9
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,643
Rep Power: 25
Gert-Jan will become famous soon enough
- You use Length Units [mm]. Why not leave it to [m]? I think CFX is a bit confused now.
- I think the constants in your equation need many more digitis. You defined:

Air cp 2 = -4e-09[K^-4]*T^4 + 6e-06[K^-3]*T^3 - 0.0025[K^-2]*T^2 + 0.3043[K^-1]*T + 1019.8

So you now take a4=-4e-9[K^-4]
I have seen very weird results with so little digits. At least take 4 more digits, or as many as needed to make sure your Cp does not vary anymore.

Bottomline: I would start over again with constant values and leave everything at SI. Then modify one thing a time: restart with modified cp. Restart again with modified labda, etc, etc.
Opaque likes this.
Gert-Jan is offline   Reply With Quote

Old   March 19, 2021, 07:46
Default
  #10
New Member
 
Pascal Schmitt
Join Date: Mar 2021
Posts: 5
Rep Power: 3
shmitzps is on a distinguished road
So I did the setup again with SI and also defined the boundary for my polynomial functions properly. These improvements made my results better, but actually the problem was not really caused by these factors.

My CFX-files were located in a cloud storage space of my institution, so I thought maybe that was causing the problem because of a possible crashing of the cloud. So I located it on the local storage space and it worked! I am sorry for not trying this earlier! Thanks guys.
shmitzps is offline   Reply With Quote

Reply

Tags
ansys 12, cfx, return code 38

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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
2-way FSI in Ansys CFX 15 LucasGasparino CFX 3 August 6, 2015 04:17
error about fsi in CFX and ANSYS WANGFIRE CFX 1 April 21, 2015 02:48
ansys solver terminated with returne code -1 raj.091603.bme CFX 1 February 13, 2014 11:52


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