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

Bubble Foam momentum equation

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 17, 2010, 00:56
Default Bubble Foam momentum equation
  #1
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17
balkrishna is on a distinguished road
I want to use the standard momentum equation in bubble Foam rather than the phase intensive one as suggested by Henrik Rusche in his PhD thesis... I got the following problems :

Code:
UEqns.H

volVectorField Uamod = alpha*Ua ;
volVectorField Ubmod = beta*Ub;
fvVectorMatrix UaEqn(Ua, Ua.dimensions()*dimVol/dimTime);
fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime);

{
    volTensorField Rca = -nuEffa*(fvc::grad(Ua)().T());
    Rca = Rca + (2.0/3.0)*sqr(Ct)*I*k - (2.0/3.0)*I*tr(Rca);

    Rca = alpha*Rca ;
    surfaceScalarField phiRa =
      - fvc::interpolate(nuEffa)
       *mesh.magSf()*fvc::snGrad(alpha);


    UaEqn =
    (
        (scalar(1) + Cvm*rhob*beta/rhoa)*
        (
            fvm::ddt(Uamod)
            + fvm::div(phia,Uamod,"div(phia,Ua,alpha)")
            - fvm::Sp(fvc::div(phia,alpha), Ua)
        )

        - fvm::laplacian(nuEffa,Uamod)
        + fvc::div(Rca)

      + fvm::div(phiRa,Ua,"div(phia,Ua)")
      - fvm::Sp(fvc::div(phiRa), Ua)
      + (fvc::grad(alpha)&Rca)
     ==
    //  g                        // Buoyancy term transfered to p-equation
      - fvm::Sp(alpha*beta/rhoa*dragCoef, Ua)
    //    + beta/rhoa*dragCoef*Ub    // Explicit drag transfered to p-equation
      - alpha*beta/rhoa*(liftCoeff - Cvm*rhob*DDtUb)
    );

    UaEqn.relax();
This compiles fine but I am not able to run it . The fvSchemes file is modified as follows :
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phia,Uamod)    Gauss limitedLinearV 1;
    div(phib,Ubmod)    Gauss limitedLinearV 1;
    div(phia,Ua)    Gauss limitedLinearV 1;
    div(phib,Ub)    Gauss limitedLinearV 1;
    div(phib,k)     Gauss limitedLinear 1;
    div(phib,epsilon) Gauss limitedLinear 1;
    div(phi,alpha)  Gauss limitedLinear01 1;
    div((-nuEffa*grad(Ua).T())) Gauss linear;
    div((-nuEffb*grad(Ub).T())) Gauss linear;
}

laplacianSchemes
{
    default         none;
    laplacian(nuEffa,(alpha*Ua)) Gauss linear corrected;
    laplacian(nuEffb,(beta*Ub)) Gauss linear corrected;
    laplacian(nuEffa,Ua) Gauss linear corrected;
    laplacian(nuEffb,Ub) Gauss linear corrected;
    laplacian((rho*(1|A(U))),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
This gives the following error .... what can be done to correct this ???
Code:
    gradientInternalCoeffs cannot be called for a calculatedFvPatchField
    on patch inlet of field (alpha*Ua) in file "/home/ifmg/MySIM/CHECK/balBubbleFoam/bubbleColumn/0/(alpha*Ua)"
    You are probably trying to solve for a field with a default boundary condition.

    From function calculatedFvPatchField<Type>::gradientInternalCoeffs() const
    in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 186.
Any suggestion to overcoming this problem ...
balkrishna is offline   Reply With Quote

 

Tags
bubblefoam, equations, momentum


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
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 19:53
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 00:59.