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

Modifying the laplacian operator

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 11, 2018, 07:54
Default
  #21
Senior Member
 
Mieszko Młody
Join Date: Mar 2009
Location: POLAND, USA
Posts: 145
Rep Power: 17
ziemowitzima is on a distinguished road
Hi,
Are you sure that the term:
Foam::fvc::laplacian( D23*T , XV)
is correct?


shoudn't it be:


Foam::fvc::laplacian( D23*XV , T)


?
ziemowitzima is offline   Reply With Quote

Old   July 11, 2018, 21:27
Default
  #22
Senior Member
 
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 16
Elham is on a distinguished road
Quote:
Originally Posted by ziemowitzima View Post
Hi,
Are you sure that the term:
Foam::fvc::laplacian( D23*T , XV)
is correct?


shoudn't it be:


Foam::fvc::laplacian( D23*XV , T)


?
Hi,

Yes I am sure based of eq 2.2 "Fluid dynamics and transport of droplets and sprays", Sirignano 2nd edition.
Elham is offline   Reply With Quote

Old   July 16, 2018, 04:56
Default
  #23
Senior Member
 
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 16
Elham is on a distinguished road
Quote:
Originally Posted by Elham View Post
Dear Foamers,

In a multiphase fluid type, I have the following form of TEqn

Code:
    fvScalarMatrix TEqn
    (
          fvm::ddt(T)
        + fvm::div(phi,T)
        - Foam::fvm::laplacian( k/rhoCp , T)
    );


    TEqn.relax();

        solve
         (
            TEqn
            ==
            fvc::ddt(p)*(1/rhoCp)
            +Foam::fvc::laplacian( D23*T , XV)
         );
where XV is vapor mass fraction as following:

Code:
rhogp= (rho2*limitedAlpha2+rho3*limitedAlpha3)/(limitedAlpha2+limitedAlpha3);
XV= rho2/rhogp
with the above equation I got too unbounded alpha fields at very first step .If I manipulate TEqn as the following:

Code:
fvScalarMatrix TEqn
    (
          fvm::ddt(T)
        + fvm::div(phi,T)
        - Foam::fvm::laplacian( k/rhoCp , T)
        - Foam::fvm::laplacian( D23*T , XV)
    );


    TEqn.relax();

        solve
         (
            TEqn
            ==
            fvc::ddt(p)*(1/rhoCp)

         );
It will blow up at the first time step with the following error:
Code:
gradientInternalCoeficients cannot be called for a calculatedFvPatchField
I will apprciate any hint for fixing.

Cheers,

Elham
Ok. I could solve the above issue:

For the first equation, I changed it to

Code:
    fvScalarMatrix TEqn
    (
          fvm::ddt(rhoCpT)
        + fvm::div(rhoCpPhi,T)
        - Foam::fvm::laplacian( k , T)
    );


    TEqn.relax();

        solve
         (
            TEqn
            ==
            fvc::ddt(p)
            +Foam::fvc::laplacian( rho2*Cp2*D23*T , XV)
         );
and the temperature field did not get unbounded anymore. The reason is that rho is not constant as well as the Cp.
And as far as I've got Foam::fvc::laplacian( rho2*Cp2*D23*T , XV) in RHS I don't have gradientInternalCoeficients error.
Elham 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
Elementwise multiplication operator johndeas OpenFOAM Running, Solving & CFD 3 March 9, 2019 13:03
Question about the fvmatrix and Laplacian operator liuhuafei OpenFOAM Running, Solving & CFD 6 October 3, 2009 06:58
Operator declaration in Thermophysical library lena OpenFOAM Running, Solving & CFD 0 March 12, 2009 09:47
Material interfaces and the laplacian operator cliffoi OpenFOAM Running, Solving & CFD 8 November 8, 2006 08:57
Material interfaces using the laplacian operator cliffoi OpenFOAM 0 November 6, 2006 10:42


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