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

NaN error before iterations begin in 3D SU2

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2025, 22:11
Default NaN error before iterations begin in 3D SU2
  #1
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
Hello,


I am very new to CFD in general and SU2 in particular. I have a simple simulation I would like to run on a flat plate in 3D. I have been getting divergence errors with NaN detected before the first iteration. I have reduced my geometry down to just a simple box, with no features other than inlet, outlet, symmetry sides, farfield top and MARKER_HEATFLUX bottom, and still I get this error (compressible RANS simulation). Even if I go to an incompressible Euler simulation with no-slip boundary on the bottom, I get the same error. I have performed enough variations to identify that the problem is definitely the bottom boundary condition. If I make it farfield, I get no error. If I make all sides of the box farfield or symmetry and place an object with no-slip boundaries inside the box, I get no error.


It seems to work fine for 2D simulations, but is there something about 3D simulations in SU2 that you cannot have a wall boundary?


Thanks for any help,
Michael
MLevene is offline   Reply With Quote

Old   January 21, 2025, 04:21
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Can you post your mesh and cfg file? This should work so something in your setup must be wrong that is not being picked up by the preprocessor. It can also be that your case simply diverges because your settings are too aggressive. How do you make your mesh?
bigfootedrockmidget is offline   Reply With Quote

Old   January 21, 2025, 18:13
Default More details
  #3
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
Hi,


I have tried a lot of different options, as well as meshes.



I make my geometry and mesh in GMSH (I got an error trying to upload it here). At this point, I don't care about accuracy of results, since ultimately I am trying to simulate something more interesting than a flat plate; I have just reduced my model to a flat plate for debugging purposes. I do not have transfinite mesh definition, or sufficient resolution near the wall, in the latest version but previous versions that did have better resolution gave the same error. Also, the run fails before it completes a single iteration, so I have been thinking it is not likely to be a mesh problem. And using a terrible mesh with a non-slip object inside the box doesn't crash.



To make the CFG file, I copied a lot from the ONERA M6 wing tutorial (you can see the header is still present in the file test.txt).



Thanks for taking the time to look at this, I really appreciate it.


Michael
Attached Files
File Type: txt test.txt (8.9 KB, 10 views)
MLevene is offline   Reply With Quote

Old   January 22, 2025, 17:02
Default NaN error
  #4
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
Sorry, I realize the test config file I uploaded previously still had the Eler boundary condition on the bottom surface. Here it is the the HEATFLUX boundary.
Attached Files
File Type: txt test.txt (8.9 KB, 1 views)
MLevene is offline   Reply With Quote

Old   January 22, 2025, 17:08
Default NaN error
  #5
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
Apologies, here is the correct file.
Attached Files
File Type: txt test.txt (8.9 KB, 8 views)
MLevene is offline   Reply With Quote

Old   January 23, 2025, 05:55
Default
  #6
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
you have the gmsh .geo file as well?
bigfootedrockmidget is offline   Reply With Quote

Old   January 25, 2025, 15:51
Default NaN error
  #7
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
Thanks for your offers of help on this, I found the problem. The setting of REF_AREA = 0, which worked in the Turbulent ONERA M6 tutorial and I understand is supposed to imply an automatic calculation, in this case caused the error. I assume it lead to a divide-by-zero error somehow, but I do not know anything about how the automatic calculation works to really understand why setting it to zero worked in the tutorial, but not for my case. It seems it just used zero as the area instead of doing a calculation.
MLevene is offline   Reply With Quote

Old   January 25, 2025, 18:27
Default
  #8
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Glad to hear that you have found the problem.



It might be that ref_area=0 does not work for your geometry because it needs to have a positive nonzero area in a certain plane (2D: y-area, 3D: z-area). So probably for your mesh, the computed reference area or reference length is zero (you can check the SU2 output of the failed case).



Can you still share the gmsh file, then I can reproduce the error and add a proper error message to SU2 when this happens.
bigfootedrockmidget is offline   Reply With Quote

Old   January 28, 2025, 21:50
Default NaN error
  #9
New Member
 
Michael Levene
Join Date: Jan 2025
Posts: 6
Rep Power: 2
MLevene is on a distinguished road
I wasn't able to upload the .geo file, but I did upload the GMSH file, although the extension is .txt


Can you use that?
Attached Files
File Type: txt btest.txt (781 Bytes, 5 views)
MLevene is offline   Reply With Quote

Old   January 29, 2025, 01:55
Default
  #10
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 775
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Thanks, I could reproduce the error. I'll look into this.
bigfootedrockmidget is offline   Reply With Quote

Reply

Tags
nan error

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
rhoSimpleFoam High Pressure Cell Crashes Simulation NorthCFD OpenFOAM Running, Solving & CFD 0 March 3, 2023 05:02
laplacianFoam with source term Herwig OpenFOAM Running, Solving & CFD 17 November 19, 2019 13:47
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Cannot run the code properly: very large time step continuity error crst15 OpenFOAM Running, Solving & CFD 9 December 14, 2014 18:17
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20


All times are GMT -4. The time now is 21:40.