CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to move background mesh with body in overset mesh method?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By zkdkeen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 5, 2020, 08:17
Default How to move background mesh with body in overset mesh method?
  #1
Member
 
Antoni Alexander
Join Date: Nov 2009
Posts: 43
Rep Power: 17
zkdkeen is on a distinguished road
Hello everyone! I am trying to simulate a boat accelerating case with v1806 which contains overset mesh method. In the case, the accelerating phase is most concerned. The acceleration can be realized by rotating the propeller. However, because the boat moving distance is very long, to save grid I want to simulate the motion by making background mesh follow the boat in x-direction. So how to do that?
zkdkeen is offline   Reply With Quote

Old   July 8, 2020, 22:15
Smile rigidBodyDynamics seems to be the entry.
  #2
Member
 
Antoni Alexander
Join Date: Nov 2009
Posts: 43
Rep Power: 17
zkdkeen is on a distinguished road
As OpenFOAM uses the rigidBodyDynamics lib to handle multi-body motions within overset mesh, it seems that the rigidBodyDynamics needs to be modified.

I am currently working on it.
zkdkeen is offline   Reply With Quote

Old   July 13, 2020, 00:12
Default Background mesh movement is done!
  #3
Member
 
Antoni Alexander
Join Date: Nov 2009
Posts: 43
Rep Power: 17
zkdkeen is on a distinguished road
I have successfully made the background mesh moving by adding a restraint in rigidBodyDynamics. From the flowing picture, we can see the background moving to the left.

An other question is rising, that is the inlet boundary condition. I used the condition same as the DTCHull tutorial. But the water is flowing away during the simulation. However, if i set the value from to 0 to 1 in the alpha.water file, there is a thin layer of water covering the whole inlet boundary cell, which is still not what I want.

So, how to set he water level at inlet boundary when moving the background mesh?

The following picture is the result of my 2D floating case.
Attached Images
File Type: jpg before1.jpg (58.1 KB, 118 views)
File Type: jpg after1.jpg (59.8 KB, 98 views)
File Type: jpg before2.jpg (58.1 KB, 93 views)
File Type: jpg after2.jpg (60.3 KB, 87 views)
Jim1310 likes this.
zkdkeen is offline   Reply With Quote

Old   July 13, 2020, 12:24
Default
  #4
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 10
benchwell is on a distinguished road
Hi Antoni,


did you use the "setFields" command and "setFieldsDict", respectively? That should set separate the inlet faces between air (0) and water (1) in alpha.water.



Best regards
benchwell is offline   Reply With Quote

Old   July 13, 2020, 22:46
Default
  #5
Member
 
Antoni Alexander
Join Date: Nov 2009
Posts: 43
Rep Power: 17
zkdkeen is on a distinguished road
Hi Felix, thanks for your reply.

Yes, I used the setFields command in the preprocess, and the setFieldsDict is as follow:
Code:
defaultFieldValues
(
    volScalarFieldValue alpha.water 0
    volScalarFieldValue zoneID 123
);

regions
(
    boxToCell
    {
        box ( -100 -100 -100 ) ( 100 0.1 100 );
        fieldValues ( volScalarFieldValue alpha.water 1 );
    }

    cellToCell
    {
        set c0;

        fieldValues
        (
            volScalarFieldValue zoneID 0
        );
    }
    cellToCell
    {
        set c1;

        fieldValues
        (
            volScalarFieldValue zoneID 1
        );
    }

);
When I changed the fixedValue to the variableHeightFlowRate at inlet for alpha.water, the case run.
alpha.water:
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    inlet
    {
        //type            fixedValue;
        //value           uniform 0;
        type            variableHeightFlowRate;
        lowerBound      0;
        upperBound      1;
        value           $internalField;

    }

    outlet
    {
        type            variableHeightFlowRate;
        lowerBound      0;
        upperBound      1;
        value           $internalField;
    }


    stationaryWalls
    {
        type            zeroGradient;
    }
    atmosphere
    {
        type            inletOutlet;
        inletValue      uniform 0;
        value           uniform 0;
    }
    floatingObject
    {
        type            zeroGradient;
    }
    bgFrontAndBack
    {
        type empty;
    }

    frontAndBack
    {
        type empty;
    }
}
And the p_rgh and U is as follow:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{

    inlet
    {
        type            fixedFluxPressure;
        value           $internalField;
       //type            zeroGradient;
    }

    outlet
    {
        type            zeroGradient;
    }
    oversetPatch
    {
        type            overset;
    }
    stationaryWalls
    {
        type            fixedFluxPressure;
    }
    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0;
    }
    floatingObject
    {
        type            fixedFluxPressure;
        value           $internalField;
    }
    overset
    {
        patchType       overset;
        type            fixedFluxPressure;
    }
    bgFrontAndBack
    {
        type empty;
    }

    frontAndBack
    {
        type empty;
    }
}
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Umean 0;
mUmean 0;
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform ($mUmean 0 0);

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"



    inlet
    {
        //type            pressureDirectedInletOutletVelocity;//freestreamVelocity;//fixedValue;
        //value           $internalField;
        //freestreamValue    (0 0 0);
        //inletDirection (1 0 0);
        //value           uniform  (0 0 0);

        type            fixedValue;
        value           $internalField;
        
        
    }

    outlet
    {
        //type            outletPhaseMeanVelocity;
        //alpha           alpha.water;
        //Umean           $Umean;
       // value           $internalField;
        type            pressureDirectedInletOutletVelocity;
        inletDirection (1 0 0);
        value           $internalField;// uniform  (0 0 0);


    }
    stationaryWalls
    {
        type           movingWallVelocity;// fixedValue;
        value           uniform (0 0 0);
    }
    atmosphere
    {
        type            pressureInletOutletVelocity;
        tangentialVelocity $internalField;
        value           uniform (0 0 0);
    }
    floatingObject
    {
        type            movingWallVelocity;
        value           uniform (0 0 0);
    }
    bgFrontAndBack
    {
        type empty;
    }

    frontAndBack
    {
        type empty;
    }
}
However, With more complicated meshes the simulation seemed to blow up. I suspect the combination of alpha.water, p_rgh and U is not stable.
Any ideas which combinations for p_rgh and U could work when fixing the inlet alpha.water level?
Hints are highly welcome!
Antoni
zkdkeen is offline   Reply With Quote

Old   July 15, 2020, 06:59
Default
  #6
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 10
benchwell is on a distinguished road
If a more complex mesh blows up the simulation, I'd assume that the mesh is responsible, not the boundary conditions.



Is the quality of the mesh acceptable? In particular with respect to overset, a suitable interpolation area must be given.
benchwell is offline   Reply With Quote

Old   September 25, 2020, 12:14
Default
  #7
New Member
 
saeed barzegar
Join Date: Feb 2012
Posts: 19
Rep Power: 14
saeed.barzegar.v is on a distinguished road
Hi Antoni,

Can you please share more detail on how you managed to get moving mesh as background mesh in the overset mesh method? I have a NWT with a moving paddle at the inlet (dynamic mesh), and I need to add a moving ship interacting with the incoming wave as well.

Thank you,
Saeed


Quote:
Originally Posted by zkdkeen View Post
I have successfully made the background mesh moving by adding a restraint in rigidBodyDynamics. From the flowing picture, we can see the background moving to the left.
saeed.barzegar.v is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 06:02
Overset mesh basic question - different results on background grid? courant_numero_uno OpenFOAM Running, Solving & CFD 0 February 10, 2020 10:54
Overset Mesh error : no startcell found ! Cris ZC STAR-CCM+ 4 September 9, 2019 11:43
Overset: refine background mesh without resetting the mesh JohnAB STAR-CCM+ 6 May 19, 2014 14:48
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


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