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

EulerD2dt2Scheme

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2017, 14:14
Default EulerD2dt2Scheme
  #1
New Member
 
Lucas Ribeiro
Join Date: Aug 2016
Posts: 23
Rep Power: 8
Warlord is on a distinguished road
Hello folks,

Does anyone know how to derive the formulas implemented for the EulerD2dt2Scheme::fvmD2dt2? Specially for the first one, applied when the mesh is moving. Any reference?

Code:
template<class Type>
tmp<fvMatrix<Type> >
EulerD2dt2Scheme<Type>::fvmD2dt2
(
    const dimensionedScalar& rho,
    GeometricField<Type, fvPatchField, volMesh>& vf
)
{
    tmp<fvMatrix<Type> > tfvm
    (   
        new fvMatrix<Type>
        (   
            vf, 
            rho.dimensions()*vf.dimensions()*dimVol
            /dimTime/dimTime
        )   
    );  

    fvMatrix<Type>& fvm = tfvm();

    scalar deltaT = mesh().time().deltaT().value();
    scalar deltaT0 = mesh().time().deltaT0().value();

    scalar coefft   = (deltaT + deltaT0)/(2*deltaT);
    scalar coefft00 = (deltaT + deltaT0)/(2*deltaT0);

    scalar rDeltaT2 = 4.0/sqr(deltaT + deltaT0);

    if (mesh().moving())
    {   
        scalar halfRdeltaT2 = 0.5*rDeltaT2;

        scalarField VV0 = mesh().V() + mesh().V0();

        scalarField V0V00 = mesh().V0() + mesh().V00();

        fvm.diag() = rho.value()*(coefft*halfRdeltaT2)*VV0;

        fvm.source() = halfRdeltaT2*rho.value()*
        (
            (coefft*VV0 + coefft00*V0V00)
           *vf.oldTime().internalField()

          - (coefft00*V0V00)*vf.oldTime().oldTime().internalField()
        );
    }
    else
    {
        fvm.diag() = (coefft*rDeltaT2)*mesh().V()*rho.value();

        fvm.source() = rDeltaT2*mesh().V()*rho.value()*
        (
            (coefft + coefft00)*vf.oldTime().internalField()
          - coefft00*vf.oldTime().oldTime().internalField()
        );
    }

    return tfvm;
}
Thank you
Warlord is offline   Reply With Quote

Reply

Tags
euler, foam-extend-3.2, fvmd2dt2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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



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