CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to access the pressure value of a moving probe when using Overset mesh? (https://www.cfd-online.com/Forums/openfoam-post-processing/220936-how-access-pressure-value-moving-probe-when-using-overset-mesh.html)

wdx_cfd September 27, 2019 09:55

How to access the pressure value of a moving probe when using Overset mesh?
 
Dear FOAMers,

I want to simulate the interaction between waves and a floating box using the two-phase model interFOAM. I want to sample the pressure of a moving sensor that fixed on the box. This is quite an easy task when using the dynamicMesh class of OpenFOAM v6.0. The probe function could perfectly resolve this problem with something just like this:

"fixedLocation false;"

However, since the dynamicMesh cannot resolve the problem of extrem mesh deformation, the Overset mesh of OpenFOAM v1906 is adopted. Now the biggest problem for me is to access the pressure of a probe on the floating box. I tried the same aforementioned setting, but the result is incorrect. In addition, when using these two mesh classes, the measured surface elevations are closed to each other. Therefore, I believe that the result is correct and there must be some problem on the setting of the probe function in controlDict. I am a new user of ESI-OpenFOAM as well as the Overset mesh, so I hope someone could provide some help to me.

Thanks a lot,
WDX.

wdx_cfd September 30, 2019 05:48

Hi, guys

Recently I found that the problem seems to be the location of the probe.

When using dynamicMesh class, the cell stretchs or compresses. Therefore, the location of the probe is changeable according the grid point. However, when using overset mesh, the background mesh is fixed, making the probe fixed even if the fixedlocation has been set to false.

Now, I wonder that, since the background mesh has been merged with the floating body mesh, how to access the probe located on the boundary of the floating body (between hole cells and interpolated cells, movable) rather than the background mesh?

Any helps will be appreciated. :)

wdx_cfd October 4, 2019 22:33

Hi, guys,

I solve this problem by using patchprobe class instead of probe!

Going deep into the code will never let you down!:D:D

wdx_cfd October 11, 2019 05:35

Unfortanately, the calculated p_rgh field seems not correct although I use patchprobe class but the motion state and surface elevation are correct. I will keep trying to find out the reason why this happens.:(

Michael@UW October 28, 2019 17:38

Hi wdx_cfd,
Did you solve this problem? I have the same issue to get the pressure on the surface of the moving object when using overset mesh on OpenFOAM v1906.

Best,
Michael

Michael@UW October 28, 2019 17:39

Quote:

Originally Posted by wdx_cfd (Post 746806)
Unfortanately, the calculated p_rgh field seems not correct although I use patchprobe class but the motion state and surface elevation are correct. I will keep trying to find out the reason why this happens.:(

Do it work correctly now? Can you post your setup?

wdx_cfd October 28, 2019 20:27

Quote:

Originally Posted by Michael@UW (Post 748269)
Do it work correctly now? Can you post your setup?

I haven't solve this problem. I use the default setup just like this:
Code:

            patchProbes
            {
                type            patchProbes;
                libs            ( "libsampling.so" );

                // Name of the directory for probe data
                name            patchProbes;

                // Patches to sample (wildcards allowed)
                patches        ("floatingObject");

                // Write at same frequency as fields
                writeControl    timeStep;
                writeInterval  1;

                interpolationScheme cellPoint;

                // Fields to be probed
                fields          (p_rgh p);

                fixedLocations  false;

                // Locations to probe. These get snapped onto the nearest point
                // on the selected patches
                probeLocations
                (
                                (0.9 0.3 0.04)
                                (0.9 0.3 0.0)
                                (0.8 0.3 -0.03)           
                );

I think presumably there is a problem of the fixed background mesh, which makes the 'fixedLocation' ineffective. Maybe we could access the different meshes through 'zoneID' and 'cellType'. But recently I do not have enough time to work on this. If you have some progress on this problem, please tell me, thank you very much. :D

Michael@UW October 28, 2019 20:41

Thank you very much for your reply.

I use this setup, and the pressure does no longer keep unchanged with time. But I haven’t inspected if the pressure probed is correct or not. I assume you did this before and conclude it is not.

Cell type and ID is a good idea to tract specific cells, but it needs to write a function object and takes time.

I will let you know if I have some progress on this problem for sure.

wdx_cfd November 2, 2019 03:51

Quote:

Originally Posted by Michael@UW (Post 748278)
Thank you very much for your reply.

I use this setup, and the pressure does no longer keep unchanged with time. But I haven’t inspected if the pressure probed is correct or not. I assume you did this before and conclude it is not.

Cell type and ID is a good idea to tract specific cells, but it needs to write a function object and takes time.

I will let you know if I have some progress on this problem for sure.

As far as I know, the value is not correct. However, I am not sure about it because there maybe some problems on my exprimental data. Recently I am trying my best to post-process my data. I will also let you know if I have progress on this problem. :)

Michael@UW November 2, 2019 09:16

The pressure history looks good though it is smaller than the experimental data.
It is probably because the time step is not small enough to capture the peak. So I expect patchprobe works for overset. I am trying to improve the mesh and temporal resolution to confirm the pressure.

wdx_cfd November 3, 2019 22:46

3 Attachment(s)
Quote:

Originally Posted by Michael@UW (Post 748689)
The pressure history looks good though it is smaller than the experimental data.
It is probably because the time step is not small enough to capture the peak. So I expect patchprobe works for overset. I am trying to improve the mesh and temporal resolution to confirm the pressure.

I use the dynamicMesh Class simulate the same case (The case crashed because the mesh has been over deformed:(, but it is enough for comparison). I found that the pressure signals cannot match each other. The pictures in the attachment are the comparison between the different methods. The blue line is the signal calculated by oversetMesh and the other is by dynamicMesh. I also compared them with my experimental data and found that the orange line matches the experimental result much better.

On the other hand, the motion states calculated by both methods are almost identical. Therefore, I believed that there must be some problems in the pressure capture process when using the Probe/Patchprobe function with oversetMesh.

wdx_cfd November 12, 2019 22:15

Quote:

Originally Posted by Michael@UW (Post 748689)
The pressure history looks good though it is smaller than the experimental data.
It is probably because the time step is not small enough to capture the peak. So I expect patchprobe works for overset. I am trying to improve the mesh and temporal resolution to confirm the pressure.

Hi, michael

Last night, I finally had time to see the code. I think I figured out this problem. Yes, you are right, using patchProbe class could sample the pressure at moving probes. However, one thing should be noted: the fixedLocations should be set to TRUE (i.e., the default value) or the location of the probe will NOT be updated. I used to set it to FALSE therefore the outputed pressure seems incorrect. Moreover, the p_rgh value seems not correct, therefore samping the p field is recommended.

Other errors are likely due to the difference between the experiment and numerical model. But the error always exists, isn't it? :p

Hope this could be useful for others.

WDX.

Michael@UW November 13, 2019 10:58

Hi WDX,

Thank you for your digging into the code and confirmation. I didn't realize I used 'fixedLoacations true' until you pointed out that. This setup really contradicts intuition as the probe is moving with mesh. It also explains why 'p-rgh' is incorrect, because the location of the probe is fixed, if p is correct, then p-rgh must be not.

Michael


All times are GMT -4. The time now is 09:26.