Need help with Salome Meca and Code Satune

More
10 years 4 months ago #7237 by Zixin
Hi Yvan,

Thank you for your help. After visualizing the error I could see the problem. Basically I've been trying to model laminar flow around certain standard objects, in this case a cone. To do this I used Salome Meca to create the geometry, basically a big box with a cone cut out in the center, and meshed it using the NETGEN 1D-2D-3D algorithm. From what I can see it looks like the boundary condition errors are occurring at the surface of the cut out cone. Do you know of any way to fix this, either using a different mesh or some other method? I am interested in what happens at the surface of the cone, so if that could be meshed as well that would be great.

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #7238 by Yvan Fournier
Replied by Yvan Fournier on topic Re: Need help with Salome Meca and Code Satune
Hello,

Now that you see which faces have errors, could you run the "check mesh" option (in the GUI, under "Calculation Options/Mesh Quality Criteria") and visualize mesh groups (you may also simply check them under SALOME, but Code_Saturne will also tell you if faces are boundary faces or interior faces in case of problems on that aspect). That way you will know whether groups are not defined correctly, or if you forgot to add some groups to your boundary condition selection criteria.

Regards,

Yvan

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #7239 by Zixin
Hi Yvan,

Thanks for your help! I've managed to successfully run the simulation now. I want to ask about the post-processing. Basically I want to be able to derive the drag coefficient and drag force on an object, as well as simulate streamlines around the object. I used Paraview to take a look at the results of the simulation but I'm not sure how to interpret the output, or how to make streamlines as that function is not available for some reason. Are there specific settings I need to use in my simulation so that I can derive these things?

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #7240 by Yvan Fournier
Replied by Yvan Fournier on topic Re: Need help with Salome Meca and Code Satune
Hello,

To view streamlines, you need to use the "Cell Data to Point Data filter first".

Also, as by default you have data both on the volume and boundary mesh, using
the "Extract Blocks" fileter before any otther is strongly recommended.

For "non-3d" values such as drag and force coefficients, programming the cs_user_extra_operations.f90 user subroutine amy be quite useful (in Code_Saturne 2.0, it was called usproj.f90, in case you are using that old version).

Regards,

Yvan
The following user(s) said Thank You: Zixin

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #7409 by Zixin
Hi Yvan,

Sorry for resurrecting an old topic. I'm still having some trouble working on this project. How do I program and use the subroutine you mentioned in your last post? I'm using the Code_Saturne wizard to do my simulation and I have little experience working with the actual code. How do you program it such that you can return the drag coefficient of an object?

Please Log in or Create an account to join the conversation.

More
10 years 2 months ago #7410 by Yvan Fournier
Replied by Yvan Fournier on topic Re: Need help with Salome Meca and Code Satune
Hello,

I recommend using the cs_user_extra_operation.f90 user subroutine. Copy it from your case's SRC/REFERENCE directory to the SRC directory, then edit your copy. Some examples may be found in SRC/EXAMPLES,

To compute the drag coefficient, you'll need to compute the efforts on the object's surface:

1) make sure efforts on the surface are computed. To do this, simply check the postprocessing output of efforts on the boudary in the GUI.

2) extract the list of boundary faces of the surface you are interested in, using the getfbr function (check for the use of getfbr in EXAMPLES/cs_user_extra_operations* or EXAMPLES/cs_user_boundary_conditions*).

3) use the post_efforts subroutine (described in the code's source in src/base/post_utils.f90) to compute efforts on the selected boundary faces.

4) sum to efforts to compute a global value. Do not forget to use parsom to sum contributions from different processes when running in parallel (here again, examples will help).

With total efforts computed, you just need the reference velocity and profile surface (which you can also compute by summing the contributions from face surfaces: the surfbo array, accessible in cs_user_extra_operations.f90 contains the boundary face normals, with lenghts proportional to their surfaces).

I won't do this in your place, but I can help check your code once you have a prototype solution.

Another, less automatic solution, once you have output the efforts on the boundary, is to use ParaView's calculator to to stages 2-4.

Best regards,

Yvan
The following user(s) said Thank You: Zixin

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.143 seconds
Powered by Kunena Forum