CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[waves2Foam] Questions about relaxation zones and dynamic pressure pd

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2015, 22:41
Default Questions about relaxation zones and dynamic pressure pd
  #1
Member
 
ALLEN
Join Date: Aug 2014
Posts: 32
Rep Power: 11
allenfieldin is on a distinguished road
Hello,Nielson,

I have recently used your waves2Foam in foam-extend-3.1 for my study on runup, I have 2 questions that have haunted me for a long time:

1. first, about the inlet relaxation zone, here is my setup:
Code:
    seaLevel    0.45;
wind            (0 0 0);

relaxationNames (inlet outlet);

initializationName outlet;

inletCoeffs
{
    waveType    stokesFirst;  
    Tsoft       0.6;
    depth       0.45;
    period      0.6;
    phi         0.000000;
    direction  (1.0 0.0 0.0);
    height      0.04;

    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;
    
        relaxType   INLET;
        startX      (0 -1 0);
        endX        (1 1 0);
        orientation      (1.0 0.0 0.0);
    }

};

outletCoeffs
{
    waveType    potentialCurrent;
    U           (0 0 0);
    Tsoft       0.6;

    relaxationZone
    {
        relaxationScheme Spatial;
        relaxationShape  Rectangular;
        beachType        Empty;    

        relaxType   OUTLET;
        startX      (3 -1 0);
        endX        (4 1 0);
        orientation      (1.0 0.0 0.0);
    }
};
The question is I tried to set up both with and without inlet relaxationZone and the resultsa are almost the same. I was told that the inlet relaxtionZone is just to prescribe the flow field which is quite different from whatis happening in the outlet relaxationZone. The outrelaxationZone is setup according to your 2012 paper, but the figure in that paper confused me by that the relaxation function you plotted for the inlet relax zone. So can you make it clear for me that waht happens when an inlet relax was set up right behind the wake generation boundary?
According to your paper, an inlet relaxationZone setup behind the wake generation boundary is used to consider the reflection from the body of the tank, like cylinders or floating bodies in the middle of the tank, is that right?

2. The second question is about the dynamic pressure pd. According to the code, pd is initialised by "setWaveField" utility, and I searched the code, find:
Code:
        if (lc.ccNeg().size() >= 4)
        {
            UTarget = waveProps_->U( lc.centreNeg(), U_.db().time().value() );
            pTarget = waveProps_->p( lc.centreNeg(), U_.db().time().value() );
            alphaTarget = lc.magNeg()/V[celli];
        }

        U_[celli] = UTarget;
        alpha_[celli] = alphaTarget;
        p_[celli] = pTarget;
as waveProps_ was newed by a wave theory (in my case, stokes first), so so I went into the stokesFirst, but I still can't find where this line "pTarget = waveProps_->p( lc.centreNeg(), U_.db().time().value() )" was evaluated. I saw only virtual scalar p in the father class waveTheory.H. Can you tell me more specifically? sorry to bother you, my programming is not good anyway.

so according to the above wavesproperties.input, I start to run the case, but the pd result is high everywhere after about 80 time steps. Actually, pd is fefined as (p-rgh), it shouldn't have so high value, right? I guess there might be some misunderstanding or wrong setup in my case, solution set up is:
Code:
solvers
{
    pdcorr
    {
        solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       1e-05;
            relTol          0;
            smoother        DICGaussSeidel;
            nPreSweeps      0;
            nPostSweeps     2;
            nBottomSweeps   2;
            cacheAgglomeration false;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }

        tolerance       1e-05;
        relTol          0;
        maxIter         100;
    };

    pd
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.01;
        smoother        DIC;
        nPreSweeps      0;
        nPostSweeps     2;
        nFinestSweeps   2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;   
    };

    pdFinal
    {
       solver          PCG;
        preconditioner
        {
            preconditioner  GAMG;
            tolerance       2e-09;
            relTol          0;
            nVcycles        2;
            smoother        DICGaussSeidel;
            nPreSweeps      2;
            nPostSweeps     2;
            nFinestSweeps   2;
            cacheAgglomeration true;
            nCellsInCoarsestLevel 10;
            agglomerator    faceAreaPair;
            mergeLevels     1;
        }

        tolerance       2e-09;
        relTol          0;
        maxIter         20;
    };

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
        minIter         1;
    };

    UFinal
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
        minIter         1;

    };

    gamma
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-06;
        relTol          0;
        minIter         1;
    };
}

PISO
{
    cAlpha          1;
    nCorrectors     2;
    nNonOrthogonalCorrectors 1;
    nOuterCorrectors 20;
    ddtPhiCorr true;
    pdRefCell 0;
    pdRefValue 0;
}

PIMPLE
{
    pRefCell 0;
    pRefValue 0;
    pdRefCell 0;
    pdRefValue 0;
    momentumPredictor yes;
    nOuterCorrectors 1; 
    nCorrectorsP     1;
    nCorrectorsU     1;
    nNonOrthogonalCorrectors 3;
    nAlphaCorr      1;
    nAlphaSubCycles 1;
}

relaxationFactors
{
    fields
    {
        pd              0.3;
    }
    equations
    {
        U               0.7;
        k               0.7;
        epsilon         0.7;
        R               0.7;
        nuTilda         0.7;
    }
}
That's all, Hope you can help me check on this. And I really want to say this tool is very helpful for my work. I expect to get a more clear understanding.

Thank you, the attachment is on the pd field for my case, time step=0.001s. This case is just a test case, not physical consideration at all.

pd-different-time-step.tar.gz
allenfieldin is offline   Reply With Quote

Old   July 31, 2015, 05:49
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hallo Allen,

@1: I do not fully understand your concern, but yes, the relaxation zones are merely a matter of avoiding (re-)reflection from the boundaries. An additional benefit is that it allows for the simulation of thousands of waves without an accumulation of water in the computational domain due to the Stokes drift, see our recent paper Jacobsen et al. (2015) in Coastal Engineering.

@2: It is caused by the fact that your sea level is not defined at 0.0.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 1, 2015, 23:19
Default
  #3
Member
 
ALLEN
Join Date: Aug 2014
Posts: 32
Rep Power: 11
allenfieldin is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hallo Allen,

@1: I do not fully understand your concern, but yes, the relaxation zones are merely a matter of avoiding (re-)reflection from the boundaries. An additional benefit is that it allows for the simulation of thousands of waves without an accumulation of water in the computational domain due to the Stokes drift, see our recent paper Jacobsen et al. (2015) in Coastal Engineering.

@2: It is caused by the fact that your sea level is not defined at 0.0.

Kind regards,

Niels

Thanks for your reply, Nielson,
@1: Okay, I will look into the code to find the difference when you realise the inlet and outlet relaxzation zone.
@2: so it won't affect the computation if I set the seaLevel not to be 0.0?
or: do I have to see the seaLevel to be 0.0 to have a "correct" result ?

might be stupid for the above questions, but I just want to make sure.

Thanks and have a nice weekend!

from Allen
allenfieldin is offline   Reply With Quote

Old   August 3, 2015, 02:26
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning Allen,

If you treat your pressure boundaries correctly it should, conceptually work. An old version (OF1.7) worked with total pressure and some people observed convergence issues, so a large value of the sea level might have the same effect, but I have never testeed it.

Kind regards

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj 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
CFX Solver stopped with error when requested for backup during solver running Mfaizan CFX 40 May 13, 2016 06:50
Dynamic mesh questions plus what the frack is up with named selections Maurosso FLUENT 2 March 25, 2013 04:59
dynamic zones in rigidbody motion aamer Main CFD Forum 0 April 3, 2011 04:02
Defining dynamic zones for Define CG motion aamer Main CFD Forum 0 March 21, 2011 03:51
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


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