inlet problem with Spalart Allmaras model

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
FredPieri

inlet problem with Spalart Allmaras model

Post by FredPieri »

Hello,

I 'am trying to run a simulation around an Naca Air foil. With a C mesh around.
My calculation run OK with all the turbulence model except Spalart-allmars.
Which with one I get this error:

@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ WARNING: ABORT BY BOUNDARY CONDITION CHECK
@ ========
@ INCORRECT OR INCOMPLETE BOUNDARY CONDITIONS
@
@ At least one boundary face declared as inlet (or
@ outlet) with prescribed velocity with an entering
@ flow for which the value of a variable has not been
@ specified (Dirichlet condition).
@ The calculation will not be run.
@
@ Verify the boundary condition definitions in the GUI
@ or in the appropriate user subroutine.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@



First face with boundary condition definition error
(out of 200)
has boundary condition type 2, center (-3.38581, -9.40412, 0.5)

I try a lot of configuration on the fluid, inlet, calculation and global parameter. But same issue.
I'am missing something here!
Could you help me ?

Thanks in advance.
Cheers
Fred

Please found attach :
1/ Jpg showing my mesh ( I hope I will use the X-mas holidays to clean my code, and then post on this forum my script to generate this mesh with a Pyhon script on Salome 7.2)
2/ My listing file
3/ My xml case file

I
Attachments
My mesh overview
My mesh overview
case0d.xml
My case file
(6.39 KiB) Downloaded 245 times
listing.txt
My listing file
(29.07 KiB) Downloaded 241 times
Yvan Fournier
Posts: 4105
Joined: Mon Feb 20, 2012 3:25 pm

Re: inlet problem with Spalart Allmaras model

Post by Yvan Fournier »

Hello,

That might be a bug, either in the GUI itself or the xml reader.

Did you re-visit the boundary conditions tabs in the GUI after switching from another model to Spalart Allmaras ? If there is an update bug in the GUI, that might work around it.

Otherwise, if you visualize the postprocessing/error.ensight (or error.med) output, what groups de the faces with an error belong to ? The inlet is the most probable, but that detaim may be useful for debugging.

Regards,

Yvan
FredPieri

Re: inlet problem with Spalart Allmaras model

Post by FredPieri »

Hello yvan

I wish you and all the code_saturne team an excellent 2014 year ! Thanks for your fabulous work!

I check the GUI after swith in in turbulence model. And this tab did not change.
I had a look inside the XML file inside the result folder, and inlet parameters looks ok.

-------------------------------------------
<inlet label="BC_2">
-<velocity_pressure choice="norm" direction="coordinates">
<norm>1</norm>
<direction_x>1</direction_x>
<direction_y>0</direction_y>
<direction_z>0</direction_z>
</velocity_pressure>
-<turbulence choice="hydraulic_diameter">
<hydraulic_diameter>1</hydraulic_diameter>
</turbulence>
</inlet>
-------------------------------------------

Yes looking at the error.case ( i have no .ensight or .med, just .case) in Paraview ,the error is on the inlet face. (not on the Side face like my previous drawing can show) .

I tried also :
with steady and unsteady flow algo.
Changing the reference length used for turbulence initialization

I have no idea how to manage it.
Thanks for your help,

Regards,
Fred

ps: My mesh file attach
ps2: I 'am using version 3.0.1
Attachments
Mesh-inlet-SA.zip
My mesh file
(2.72 MiB) Downloaded 257 times
Brian Angel

Re: inlet problem with Spalart Allmaras model

Post by Brian Angel »

Hello Fred,

I have tried running your case using version 3.2-alpha of Code_Saturne. I can replicate the problem that you have here in that the Spallart-Almaras model has a problem with a boundary condition when trying to run the simulation but, for example, the k-eps model has no problem and runs using the exact same set-up (at least for the 15 time steps you specified in the xml file).

I have completed an sdiff of the check_mesh.log files to ensure that both turbulence models see the same boundary conditions and number of associated faces. This is the case.

I have also completed an sdiff of the listing files. Again there are no differences except for those related to the choice of turbulence model.

The error in the listing file related to the Spallart Almaras model simulation cites the boundary with 246 faces from the volume mesh that you supplied (Mesh_1Q.med). In the check_mesh and listing files, the boundary with 246 faces corresponds to the wall boundary condition "Group-wall_extruded" which has been defined in the Code_Saturne GUI and which I assume is located on the airfoil surface .

However, in the check_mesh and listing files, it would appear that some boundaries have not been declared or assigned a boundary type in the Code_Saturne GUI or eslewhere. Can you remove these unused boundaries from your med file such that the only boundaries that are left are Group-inlet_extruded, Group_outlet_extruded, Group-wall_extruded, Group_sym and Group_sym_top then try to rerun the Spallart-Almaras simulation and let me know what happens.

Regards,

Brian Angel.
FredPieri

Re: inlet problem with Spalart Allmaras model

Post by FredPieri »

Hello Brian,

Thanks for spending some time on my problem ! I appreciate it.

Unfortunately I got the same error message even with the cleaned Mesh file ( I mean with only : Group-inlet_extruded, Group_outlet_extruded, Group-wall_extruded ). Please found it attached.

in the listing file I can read :
-------------------
First face with boundary condition definition error
(out of 116)
has boundary condition type 2, center (-4.89079, -8.47096, 0.5)
--------------------
With is the face I show in the picture attached ( with the white little box in his center). it is an inlet face.

It is true that 116 face is the number of face on the wall (airfoil ) , but the error looks to be on the inlet.

So I guess that means error is on 116 faces over the 256 inlet faces . That should refers to all the inlet face generated in the front part of the mesh, generated around the profile.

I tried some other turbulence model: mixing length, K-e , K-e linear , K-omega sst ,LES and only Spalart allmaras is problematic.
I tried different mesh density, no results.

Best regards,

Fred

PS: if that can help you can download all my study there: http://we.tl/nVwsgK5jVn
Study name : STUDYQL
Case name : CASE0D
There are 2 folder the first one is with K-e turbulence model , no problem is running well.
The second one is the attempt with Spalart Allmaras model

( Do you know a better solution tu upload big file ? What is the usual method on the forum? To let the possibility to people potentially interested by this thread in the future to still be able to get the document, expiration date is 15 janv 2014 , only 1 week)

PS2: I use only 15 iterations and a coarse mesh only for a debugging.
Attachments
The first bug face
The first bug face
CASE0D.xml
Case Xml file
(6.31 KiB) Downloaded 233 times
Mesh_1QL-med.zip
My clean mesh
(688.39 KiB) Downloaded 241 times
Brian Angel

Re: inlet problem with Spalart Allmaras model

Post by Brian Angel »

Hello Fred,

It looks like there is a bug with the Spallart-Almaras turbulence model given that other turbulence models work regardless of the mesh and boundary conditions. I'll register this as such and keep you posted. In the meantime I'll have a look and see if there is a work around when using the Spalart-Almaras turbulence model and let you know. If no work around is possible, is it possible for you to use another turbulence model?

Regards,

Brian.
FredPieri

Re: inlet problem with Spalart Allmaras model

Post by FredPieri »

Hello Brian,

Thanks for that !

yes I will try to use an other turbulence model, but I am in now in a validation test time, I am trying to compare CFD Code_Saturne with the results I am used to , provided by Xflr5 (Xfoil).
Testing different meshing , turbulence model and solving option.

And I read that Spalart Allmaras is a good model for Airfoil calculation and external aerodynamic in general that 's why I would like to try it.

Actually, I got significantly more drag and less lift that Xflr5.

I 'will continue more test, and if someone had experience on airfoil simulation I greatly appreciate any advice and will eat it all up!

Regards,
Fred

Ps: I 'm working at Reynolds number around 1 800 000. on a NACA 2412.
Jacques Fontaine
Posts: 118
Joined: Mon Feb 20, 2012 2:07 pm

Re: inlet problem with Spalart Allmaras model

Post by Jacques Fontaine »

Hello,
Could you try again with the patch attached (add it in the SRC dir)?
Regards,
Attachments
stdtcl.f90
(18.39 KiB) Downloaded 249 times
Brian Angel

Re: inlet problem with Spalart Allmaras model

Post by Brian Angel »

I've just tried the patch with the Spalart-Almaris model and Code_Saturne runs.

Best regards,

Brian Angel.
FredPieri

Re: inlet problem with Spalart Allmaras model

Post by FredPieri »

Hello Jacques and Brian,

Thanks for your answer,
But I 'am not used with the user subroutine yet and I could not manage to make it work:

I got this error message below.
Please found attached the "compile.log" file

How can i fix it?
Thanks a lot,
Cheers
fred

****************************************
Compiling user subroutines and linking
****************************************

Traceback (most recent call last):
File "/home/fred/opt/code_saturne-3.0.1/bin/code_saturne", line 77, in <module>
retcode = cs.execute()
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_script.py", line 73, in execute
return self.commands[command](options)
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_script.py", line 125, in run
return cs_run.main(options, self.package)
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_run.py", line 209, in main
save_results=save_results)
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_case.py", line 1535, in run
mpi_environment)
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_case.py", line 1246, in prepare_data
d.compile_and_link()
File "/home/fred/opt/code_saturne-3.0.1/lib/python2.6/site-packages/code_saturne/cs_case_domain.py", line 578, in compile_and_link
raise RunCaseError('Compile or link error.')
cs_case_domain.RunCaseError: Compile or link error.
****************************************
Attachments
compile.log
compil error file
(491 Bytes) Downloaded 220 times
Post Reply