CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   pressureGradient dictionary (http://www.cfd-online.com/Forums/openfoam-pre-processing/114302-pressuregradient-dictionary.html)

dav.dap83 March 8, 2013 12:11

pressureGradient dictionary
 
Hi,


I need to implement a pressureGradient force for spray parcels. I want to simulate gas parcels into a liquid using sprayFoam.

However, pressureGradient force needs a dictionary, and I have not been able to find an example of such a dictionary.
Can anyone provide an example, please?


Thanks

chegdan March 14, 2013 00:53

Voila! :D

Code:

    particleForces
    {
                gravity;
                pressureGradient
                {
                        U        U;
                };

    }

Note: This works for 2.1.x

maysmech October 5, 2014 00:41

Quote:

Originally Posted by chegdan (Post 413838)
Voila! :D

Code:

    particleForces
    {
        gravity;
        pressureGradient
        {
            U    U;
        };

    }

Note: This works for 2.1.x

Hi,
It doesn't work with DPMFoam in 2.3.0

dav.dap83 October 5, 2014 07:21

Quote:

Originally Posted by maysmech (Post 512928)
Hi,
It doesn't work with DPMFoam in 2.3.0

In DPMFoam the velocity field of the fluid phase is named with Uc rather than U. So you just need to write:

Code:

    particleForces
    {
        gravity;
        pressureGradient
        {
            U    Uc;
        };

    }


maysmech October 5, 2014 21:13

Quote:

Originally Posted by dav.dap83 (Post 512965)
In DPMFoam the velocity field of the fluid phase is named with Uc rather than U. So you just need to write:

Code:

    particleForces
    {
        gravity;
        pressureGradient
        {
            U    Uc;
        };

    }


Thanks, But it leads to this error:
Code:

--> FOAM FATAL ERROR:

    request for volVectorField Uc from objectRegistry region0 failed
    available objects of type volVectorField are
1(U.air)

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/aut/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
#3  Foam::PressureGradientForce<Foam::KinematicCloud<Foam::Cloud<Foam::CollidingParcel<Foam::KinematicParcel<Foam::particle> > > > >::cacheFields(bool) at ??:?
#4 
 at ??:?
#5 
 at ??:?
#6 
 at ??:?
#7 
 at ??:?
#8 
 at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 
 at ??:?
Aborted (core dumped)

DPMFoam uses U.air for velocity so using U.air instead of Uc leads to:

Code:

--> FOAM FATAL IO ERROR:
keyword DUcDt is undefined in dictionary "/home/user/OpenFOAM/aut-2.3.0/run/tutorials/lagrangian/DPMFoam/testSaffman/constant/kinematicCloudProperties.solution.interpolationSchemes"

file: /home/user/OpenFOAM/aut-2.3.0/run/tutorials/lagrangian/DPMFoam/testSaffman/constant/kinematicCloudProperties.solution.interpolationSchemes from line 27 to line 29.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 437.

FOAM exiting



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