CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Sloshing Case - Probing or Sampling free surface during runtime (https://www.cfd-online.com/Forums/openfoam-solving/148663-sloshing-case-probing-sampling-free-surface-during-runtime.html)

Esweer February 17, 2015 03:34

Sloshing Case - Probing or Sampling free surface during runtime
 
In order to runtime post-process a sloshing case (3D) different options are available to sample the free surface in distinct locations inside the domain. I am currently using OpenFOAM 2.3.0 to do some test calculations for that.

Runtime postprocessing functions can be used in the system/controlDict for fast and easy determination of the values. First option is using the "set" function.

Code:

functions
{
    Probe01
    {
    type                          sets;
    interpolationScheme    cellPoint;
    outputControl              adjustableTime;
        writeInterval          0.05;
    setFormat                  raw;
    sets
    (
    centerPatch
    {
        type uniform;
        axis xyz;
        start (0.000 0.000 1.000);
        end  (0.000 0.000 2.000);
        nPoints 10;
    }
    );
   
    surfaces
    ();
   
    fields
    (
        alpha.water
    );
    };
}

The above works fine for interpolating the free surface from cell (interpolation Scheme can be given by switch interpolationScheme), but unfortunately the probed set is fixed in space and there seems to be no way to move the probe location with the dynamic mesh.

Second option in runtime postprocessing functions is the "probe" function, where definition of single probe locations in a line can be done e.g. like this:

Code:

functions
{
    Probe02
    {
        type                      probes;
        functionObjectLibs    ("libsampling.so");
        outputControl          adjustableTime;
        writeInterval            0.05;
        probeLocations
        (
          (0.000 0.000 1.000)
          (0.000 0.000 1.100)
          (0.000 0.000 1.200)
          (0.000 0.000 1.300)
          (0.000 0.000 1.400)
          (0.000 0.000 1.500)
          (0.000 0.000 1.600)
          (0.000 0.000 1.700)
          (0.000 0.000 1.800)
          (0.000 0.000 1.900)
          (0.000 0.000 2.000)
        );
        fixedLocations  false;
        fields
        (
            alpha.water
        );
    }
}

By setting the switch fixedLocations to true, the probe locations are again fixed in space, by setting to false the probes are moving relative to the dynamic mesh. Unfortunately, here no interpolation scheme can be user selected and the function is always using interpolation to cell, resulting in quite coarse resolution of free surface.

Therefore both ways do not seem to lead to what I am interested in, interpolating the free surface with cellPoint interpolation in locations fixed in the dynamic Mesh. Does anyone have ever thought about a solution for this problem? I guess so!

I have also tried to do the same with sampleDict or probeDict postprocessing, but obviously the switch "fixedLocations false;" is not functioning their in either case.

Looking very much forward for your kind help!


All times are GMT -4. The time now is 12:07.