Hi team,
I am trying to validate a numerical model by running a study previously done on openfoam and compared to experimental results.
The first issue I encounter is maintaining the maximum value of y+ around 4. If I understand correctly to achieve this value the first zone of the boundary layer in contact with the wall should be around 0.0014. However the calculation gets corrupted when I include this value in zone thickness in the mesh_modify.c file (see attachement). For instance with a thickness of -0.3 it works fine, but the results are very different at the end. Please note that I am comparing the aerodynamic coefficients. Also I want to know the equivalent elements in CS of:
- Gauss scheme with a linear interpolation
-slip wall
Finally is there a simple way to get the vortex shedding frequency or it should be done with UDF?
thank you for your help.
Kindly
model validation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: model validation
here are the files:
- Attachments
-
- cs_user_extra_operations.c
- (4.54 KiB) Downloaded 503 times
-
- setup.xml
- (8.78 KiB) Downloaded 509 times
-
- cs_user_mesh-modify.c
- (4.03 KiB) Downloaded 511 times
-
- Posts: 4157
- Joined: Mon Feb 20, 2012 3:25 pm
Re: model validation
Hello,
What do you mean by "calculation gets corrupted" ?
- Does the code crash on an invalid memory access error ?
- Or are the results bad/unexpected ?
If the code runs but provides incorrect results, you may have a mesh quality issue. Notably, if cells inserted in the viscous layer have a high aspect ratio and are slightly warped, the degraded quality may be worse than not having the optimal y+.
Note that when setting the zone thickness, using a negative value means the corresponding absolute value is used as a relative size (compared to the neighboring cells), and a positive value is used as a fixed size. Depending on the mesh, the first option is usually easier to use, but the second may allow finer control. And you can subdivide zones to use different options in different areas.
Finally, I do not know to which part of the NS equations the "Gauss scheme with a linear interpolation" corresponds to in OpenFoam, so am no sure about the answer. Is it relative the the gradient reconstructions, or to a larger portion of the numerical resolution ?
In code_saturne, if you use turbulence models, all "wall" BCs are slip walls by default. For no-slip walls, you need to use user-defined functions and change the "icodcl" value of matching faces to 1 if I remember correctly (you may want to double-check this in the user manual).
And no, sorry, there is no a simple way to get the vortex shedding frequency outside of using a UDF or a combination of UDF and post-hoc processing. For our "vortex shedding behind a cylinder" validation case, we do have a UDF which could probably be adapted, but to be more precise, we also use a Python script post-hoc to use an FFT so as to obtain the frequency.
Best regards,
Yvan
What do you mean by "calculation gets corrupted" ?
- Does the code crash on an invalid memory access error ?
- Or are the results bad/unexpected ?
If the code runs but provides incorrect results, you may have a mesh quality issue. Notably, if cells inserted in the viscous layer have a high aspect ratio and are slightly warped, the degraded quality may be worse than not having the optimal y+.
Note that when setting the zone thickness, using a negative value means the corresponding absolute value is used as a relative size (compared to the neighboring cells), and a positive value is used as a fixed size. Depending on the mesh, the first option is usually easier to use, but the second may allow finer control. And you can subdivide zones to use different options in different areas.
Finally, I do not know to which part of the NS equations the "Gauss scheme with a linear interpolation" corresponds to in OpenFoam, so am no sure about the answer. Is it relative the the gradient reconstructions, or to a larger portion of the numerical resolution ?
In code_saturne, if you use turbulence models, all "wall" BCs are slip walls by default. For no-slip walls, you need to use user-defined functions and change the "icodcl" value of matching faces to 1 if I remember correctly (you may want to double-check this in the user manual).
And no, sorry, there is no a simple way to get the vortex shedding frequency outside of using a UDF or a combination of UDF and post-hoc processing. For our "vortex shedding behind a cylinder" validation case, we do have a UDF which could probably be adapted, but to be more precise, we also use a Python script post-hoc to use an FFT so as to obtain the frequency.
Best regards,
Yvan
Re: model validation
Hi,
Thank you for your reply.
By corrupted I mean I get different errors each time, sometimes related to cells connectivity and sometimes divergence.
As for the Gauss scheme it is related to the gradient terms dicretization.
After changing the cell size near the wall I am interested in, the calculation runs fine. It was indeed due to the high aspect ratio of cells inserted in the boundary layer. However I still don't get comparable results. Do you have any other suggestions?
Thank you.
Thank you for your reply.
By corrupted I mean I get different errors each time, sometimes related to cells connectivity and sometimes divergence.
As for the Gauss scheme it is related to the gradient terms dicretization.
After changing the cell size near the wall I am interested in, the calculation runs fine. It was indeed due to the high aspect ratio of cells inserted in the boundary layer. However I still don't get comparable results. Do you have any other suggestions?
Thank you.
-
- Posts: 4157
- Joined: Mon Feb 20, 2012 3:25 pm
Re: model validation
Hello,
If you get different results each time, there may be some memory corruption, which indicates a bug... How large is your test case ? If it is not too big, I would be interested in running it under a tool such as Valgrind or a build using AdressSanitizer to check for a bug in code_saturne...
If you can do that on your side and provide feedback, that is fine also (actually, even better at least for a first step).
Best regards,
Yvan
If you get different results each time, there may be some memory corruption, which indicates a bug... How large is your test case ? If it is not too big, I would be interested in running it under a tool such as Valgrind or a build using AdressSanitizer to check for a bug in code_saturne...
If you can do that on your side and provide feedback, that is fine also (actually, even better at least for a first step).
Best regards,
Yvan
Re: model validation
Hi,
Please find attached the setup and mesh files. I am not really familiar with these tools but I will try them and get back to you.
Thank you for your help.
Please find attached the setup and mesh files. I am not really familiar with these tools but I will try them and get back to you.
Thank you for your help.
- Attachments
-
- validation_model.zip
- (4.37 MiB) Downloaded 508 times