Floating point error compressible 2D diamond airfoil


#1

Hi everyone,

Currently attempting to run a 2D diamond airfoil simulation, however, am running in the floating point error for the k-omega SST turbulence model. Adjusted for all possible boundary and initial conditions as well as transient pressure based analysis type with no luck. Not sure where the source of error is although it probably is a glaring one. The project link is here and if anyone has any idea what the glaring issue is do let me know!

Cheers!

Regards,
Barry


#2

Hi Barry!

Maybe this post of @jprobst helps you: Most Popular Errors of Simulation. Ran into similar issues in the past and his post was quite useful.

Cheers!

Jousef


#3

Hi Jousef!

Great post! However, I’ve applied all possible fixes with no luck and resulted in the same case of an instant error with the error message stating floating point error as well. I’ve tried a different turbulence model using Laminar and no luck there too.

Cheers!

Regards,
Barry


#4

Hi everyone,

A quick update, the geometry I’ve checked and it is watertight and has no errors as far as I can see. Re-meshing using different methods like using Hex cells or rectangular cells has no change on the outcome which is effectively and instant error.

Similarly, an incompressible flow simulation also has the same floating point error. No idea what could be the cause.

Cheers.

Regards,
Barry


#5

Hi Barry,

already had a look at your project and could not find any major issues… did you figure out why the simulation won’t finish or even stop throwing the exception? There are some templates in the public projects for compressible simulation you can use but some are calculated laminar which is not what you want, right? Maybe have a look at this one and tell me if that helped (but I assume you already checked that): Compressible Airfoil Sim.

Best,

Jousef


#6

Hi Jousef,

Yup! Wanted to use k-omega SST so most of the projects aren’t that relevant.

Indeed I have checked around 3-4 different projects and tried all the various boundary conditions and all that. No success so far. Very strange indeed. I’ll keep exploring but kind of out of ideas at the moment

Cheers!

Regards,
Barry


#7

Hi Barry!

Thought about ramping the velocity to avoid divergence? Another post dealt with the ramping issue and I had the idea of mentioning it here as it may help running the simulation especially in the compressible case.

Enjoy your weekend!

Jousef


#8

Hey Jousef,

Sam from support did give this suggestion and instead I’ve just set the velocity to something really low like 10m/s and the same instant error still occurs. I’ve mentioned it to Sam as well and he hasn’t got back to me yet.

I’ve tried a 3D diamond aerofoil and tried to do the same thing but same result so its super strange.

Cheers.

Regards,
Barry


#9

Hi Barry,

hm okay very strange :thinking: Seems like I have to start a little research myself on how to overcome possible obstacles in those kinds of simulation.

Cheers!

Jousef


#10

Hi Jousef!

Do let me know if you have any solutions. Still scratching my head over here :disappointed_relieved:

Cheers.

Regards,
Barry


#11

Hi everyone,

Just a quick update. So basically my approach has been really wrong the whole time. The idea was there but the initial guess on what is wrong was well… wrong to say the least. Initially I guessed the numerics were incorrectly set and not enough consideration was given to adjusting the errors within the simulation of the aerofoil. After this was exhausted with the introduction of the automatic relaxation factors, my next guess was the “3D” nature of the 2D simulation. I’m unable to effectively create a true 2D simulation but I figured cutting into a 3D diamond aerofoil like most other 2D via “3D” simulations have done would be alright. I guessed again that it was this that was the issue, turns out it wasn’t.

The core issue after many months of on and off on the project (if you notice the date) was a simple issue with the solver chosen. Dylan has stated in this post why the solver I used (rhoPimpleFoam) was unable to resolve the strong shocks I was looking to re-create in order to verify with the theta beta mach shock graph. In short, rhoPimpleFoam was missing a transonic formulation and instead the laminar transient density based solver (rhoCentralFoam) only can be used. The results produced are now much more workable and it is free of the inherit problems that this thread initially encountered. I’ve went ahead and simulated and here is a screenshot of the initial results.

The strong shocks have shown up and are somewhat behaving as expected. The current shock wave angle here is 48 degrees while the theta beta mach shock graph states that for this speed (Mach 2 or 612.54 m/s) the shock angle should be 45 degrees. The simulation has not truly converged and a simple increase in end time should allow it to reach the correct shock angle.

I will continue to work on this and ideally run several different angles of the diamond aerofoil to validate the shock angle produced once I’ve obtained the correct setup for this particular case.

Thanks everyone for all the help previously and currently.

Cheers.

Regards,
Barry


#12

Awesome!! These findings are actually timely for us thanks. I’ll pass the simulation on.

Would refining those shock waves change the results? I can produce a 2D mesh from 3D if you need it to make a super refined 2D mesh.

Best,
Darren.


#13

Hey Darren,

Good coincidence then!

Will need to do a mesh independence study. Still trying to get it a little more refined.

You can? How so? I certainly want to try that out!

Cheers.

Regards,
Barry

EDIT: Hey Darren, not sure about the best way to measure the shock front is. Maybe you could download the results and measure the shock front on your end and compare it with mine? So far I’m getting around 48 deg but if I measure it slightly differently, I can get 45 deg reasonably. Also, will be testing out other schemes, don’t think that will make such a large difference however. Looking forward to your 2D geom so I can start meshing or simulating it. Here is the project link again for your reference.


#14

Hi @Get_Barried, cool, if you produce a mesh with refinements in the areas of the shock waves I can then extrude a side of the mesh to get an actual 2D mesh. Once you have made the mesh, I will download it, extrude it, then give you the settings so you can reproduce for further meshes. P.S. it doesn’t matter if the mesh is huge, as it won’t be once I have extruded it.

And sure I will give it a go.

Best,
Darren

Edit: I get around 48 too (47.86 deg)


#15

Hey Darren,

Apologies for the long reply. Been pretty busy at work and over the weekend was occupied as well.

I decided that performing a MIS would not be smart initially as I’m not sure how the mesh would react for 2D vs 3D and there is no guarantee that the meshes would behave similarly (even if it is close to 2D).

I did get a new mesh up that is relatively fine, hopefully not too fine, and it is under “Shock refined 3”.

Looking forward to the 2D mesh! Let me know if you have any issues.

Cheers.

Regards,
Barry


#16

Hi Barry, Firstly here is the file where the magic happens, in there is extrudeMeshDict which can be edited in the future to extrude other meshes:
https://1drv.ms/u/s!AmmuZY9R6wFaiL0aY854lwTM6oY4IA

Secondly, I created a video on how to do this so you can hopefully do it at your leisure:

And finally here is a project which I uploaded the 2D mesh:
https://www.simscale.com/projects/dlynch/compressible_flow_diamond_airfoil_validation_-new_correction-/

Also, I recommend improving the quality of the extruded face:

As you can see this will likely skew results, I find that this is usually improved if the bounding box slightly intersects the geometry it is meshing so that the face to extrude would belong to the bounding box, not the geometry.

Any questions feel free to ask :slight_smile:

Best,
Darren


#17

Hey Darren,

Awesome stuff! Maybe you should consider doing ASMR :rofl:!

I’ll get to working on it throughout the week. Can the 2D mesh be uploaded and simulated here? I suppose it could. Never really seen a 2D public project before or not that i remember.

EDIT: Ah I see how it works, ignore the above line :stuck_out_tongue: I’ll do some refinements and perform your 3D to 2D!

Cheers buddy and thanks again for the awesome work.

Regards,
Barry


#18

Is it bad I had to google that? :smiley:

Yes just zip up the constant folder and upload it here as an OpenFOAM mesh.

Good luck!
Darren


#19

Hey Darren,

I did as you propose and the issue still seems to persist. Seems like maybe the quality controls are deleting the layers at the tip off. Any ideas on how to rectify this?

Cheers.

Regards,
Barry


#20

Hi @Get_Barried, this might be a simple case of reducing the minimum angle between patches for layers to under 20 degrees. if this doesn’t solve then maybe @DaleKramer can help, he was onto something when he was looking at maintaining layers at the TE of his wing. It’s worth a read.

Best,
Darren