CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS (https://www.cfd-online.com/Forums/ansys/)
-   -   CFD-Post evaluation (https://www.cfd-online.com/Forums/ansys/239384-cfd-post-evaluation.html)

farbflash_ November 3, 2021 08:38

CFD-Post evaluation
 
1 Attachment(s)
Hello,


I want to quantify the zone under the iso-surface shown in the picture. Therefore I calculate volume and length. Is there a way of doing it in CFD-Post?
For now, I'm exporting the surface and calculate the result in MATLAB. But as I want to automate the process, the sweetest option would be to do it in CFD-Post.

Thanks in advance,
Lukas

Gert-Jan November 13, 2021 06:09

You can create a volume from an isosurface. Then the elements below, at or above can be included. This volume can be quantified using an expression.

Remember that the isosurface is an interpolation in space. The volume method includes whole elements which will not align with the isosurface. So, the method will deviate from what you probably will determine in MATLAB. This should not be a problem as long as you know what you are doing. What also helps is to reduce local mesh size.

farbflash_ November 13, 2021 06:55

Quote:

Originally Posted by Gert-Jan (Post 816449)
You can create a volume from an isosurface. Then the elements below, at or above can be included. This volume can be quantified using an expression.

Remember that the isosurface is an interpolation in space. The volume method includes whole elements which will not align with the isosurface. So, the method will deviate from what you probably will determine in MATLAB. This should not be a problem as long as you know what you are doing. What also helps is to reduce local mesh size.


First of all thanks for your reply.
What kind of expression do I need? What should it look like?

Gert-Jan November 13, 2021 07:43

You can use the function calculator. Look for the function volume and the location i.e. the volume as covered by your isosurface.
By pressing apply, you will find the volume.
If you tick on "Show equivalant expression", the calculator will show you the expression that is used. You can copy this equation to a table in Post which will give you the same number. (Remove the additional spaces that come when copying from the function calculator.)
This table can be part of the Report that can be saved for further processing outside Post..

An additional option is to add Text to a figure. In the text definition, you can add the expression as well. Then you have a figure with the volume as a number.

farbflash_ November 14, 2021 04:03

Quote:

Originally Posted by Gert-Jan (Post 816453)
You can use the function calculator. Look for the function volume and the location i.e. the volume as covered by your isosurface.
By pressing apply, you will find the volume.
If you tick on "Show equivalant expression", the calculator will show you the expression that is used. You can copy this equation to a table in Post which will give you the same number. (Remove the additional spaces that come when copying from the function calculator.)
This table can be part of the Report that can be saved for further processing outside Post..

An additional option is to add Text to a figure. In the text definition, you can add the expression as well. Then you have a figure with the volume as a number.

Ah perfect, it’s working. There is only one problem left, the region in the picture is a iso-clip from a isosurface. There are several regions which are matching my condition from the isosurface, so i had to clip them. But the calc function does not seem to calculate volume from a clip, right?
Is there a work around? I've been trying to get around it for several hours but couldn’t find a way yet.
As always: thanks in advance, Gert-Jan.

Gert-Jan November 14, 2021 04:56

You can create an expression with step-functions with geometrical limits for clipping.
Say your isosurface is the air volume fraction 0.99 and only want to see it above z=1, above y=0 and above x=0. Then you can create an expression something like;

airvfxyzlimit = Air.Volume Fraciton*step(z/1[m]-1)*step(y/1[m])*step(x/1[m])

Then go to the tab Variables, create a new variable like AirVFxyzlimit and let it refer to your expression airvfxyzlimit

Then go to your isosurface, and use the geometrically limited variable on the value 0.99. If your x, y and z limits have the right values, then you only see the small isosurface that you want.

Now to determine the volume within this isosurface, use the geometrically limited variable in the expression.

___________
P.S. In principle, you don't need the new variable, since you can determine the volume right away from the geometrically limited expression. But a visual confirmation of what you are doing is correct, will help a lot in the beginning.

farbflash_ November 14, 2021 06:08

Quote:

Originally Posted by Gert-Jan (Post 816492)
You can create an expression with step-functions with geometrical limits for clipping.
Say your isosurface is the air volume fraction 0.99 and only want to see it above z=1, above y=0 and above x=0. Then you can create an expression something like;

airvfxyzlimit = Air.Volume Fraciton*step(z/1[m]-1)*step(y/1[m])*step(x/1[m])

Then go to the tab Variables, create a new variable like AirVFxyzlimit and let it refer to your expression airvfxyzlimit

Then go to your isosurface, and use the geometrically limited variable on the value 0.99. If your x, y and z limits have the right values, then you only see the small isosurface that you want.

Now to determine the volume within this isosurface, use the geometrically limited variable in the expression.

___________
P.S. In principle, you don't need the new variable, since you can determine the volume right away from the geometrically limited expression. But a visual confirmation of what you are doing is correct, will help a lot in the beginning.


Its working like a charm!
Thanks a lot, Gert-Jan!


All times are GMT -4. The time now is 18:56.