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

getting a annoying error when simulating flow over porous media

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2014, 11:24
Default
  #21
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
I found following article also useful in understanding the porous media implementation. Look at first term in the equation 1. In the previous version of openfoam it was implemented in modifyDdt routine.

https://www.google.co.in/url?sa=t&rc...68445247,d.c2E
santoo_cfd is offline   Reply With Quote

Old   June 10, 2014, 05:23
Default
  #22
New Member
 
Peter
Join Date: Apr 2014
Posts: 21
Rep Power: 12
John Degenkolb is on a distinguished road
Hi Santhosh,

sorry, that was my mistake, I mixed up porosity and permeability.

I neither used the porosity value, nor do I have a porousZones folder. The way I incorporated the porosity was by simply multiplying the d-value (the reciprocal of the Darcy coefficient) with the porosity.

Is it a correct way to do so?

Peter
John Degenkolb is offline   Reply With Quote

Old   June 10, 2014, 08:07
Default
  #23
Member
 
santhosh
Join Date: Apr 2009
Location: India
Posts: 70
Rep Power: 17
santoo_cfd is on a distinguished road
I not very sure whether you can incorporate the effect of porosity by modifying the viscous resistance/permeability value. For relatively simple models/geometries you can derive the permeability value by using porosity (Kozeny-karman). But for complex geometries it is difficult to arrive at such a correlation.

In other thread, I came to know about wave2Foam toolbox, where they have implemented this feature in porousWaveFoam. If you are interested you may go through it. I am currently started looking into it.
santoo_cfd is offline   Reply With Quote

Old   November 30, 2014, 04:59
Default
  #24
New Member
 
Mahdi
Join Date: Sep 2013
Posts: 11
Rep Power: 12
Masgar is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

As the error occurs in explicitPorositySource, you can take a look at its constructor:

Code:
Foam::fv::explicitPorositySource::explicitPorositySource
(
    const word& name,
    const word& modelType,
    const dictionary& dict,
    const fvMesh& mesh
)
:   
    option(name, modelType, dict, mesh),
    porosityPtr_(NULL),
    UName_(coeffs_.lookupOrDefault<word>("UName", "U")),
    rhoName_(coeffs_.lookupOrDefault<word>("rhoName", "rho")),
    muName_(coeffs_.lookupOrDefault<word>("muName", "thermo:mu"))
{
    initialise();
}
As you can see if there's no muName in porosity source coefficients dictionary, it will use thermo:mu.

I guess your source is described like
Code:
    explicitPorositySourceCoeffs
    {
        type            DarcyForchheimer;
        DarcyForchheimerCoeffs
        {
            d   d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
            f   f [0 -1 0 0 0 0 0] (0 0 0);

            coordinateSystem
            {
                e1  (0.70710678 0.70710678 0);
                e2  (0 0 1);
            }
        }
    }
Try adding 'muName mu;' to explicitPorositySourceCoeffs dictionary so it will be

Code:
    explicitPorositySourceCoeffs
    {
        muName     mu;
        type            DarcyForchheimer;
        DarcyForchheimerCoeffs
        {
            d   d [0 -2 0 0 0 0 0] (5e7 -1000 -1000);
            f   f [0 -1 0 0 0 0 0] (0 0 0);

            coordinateSystem
            {
                e1  (0.70710678 0.70710678 0);
                e2  (0 0 1);
            }
        }
    }

Hi Alexey,

I have encountered the similar problem:

--> FOAM FATAL ERROR:

request for volScalarField nu from objectRegistry region0 failed
available objects of type volScalarField are

2
(
rAU
p
)

To have a better explanation, I am using a mesh motion solver: icoDyMFoam. As I wanted to have porosity solver, I tried to add porosity to this solver with this hint: http://www.cfd-online.com/Forums/ope...tml#post508703

Now the solver seems to be compiled, so I added a porousZones file to constant folder as follows:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object porousZones;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

1
(
poro
{
coordinateSystem
{
e1 (1 0 0);
e2 (0 1 0);
}

Darcy
{
d d [0 -2 0 0 0 0 0] (1000 1000 1000);
f f [0 -1 0 0 0 0 0] (0 0 0);
}
}
)

but I received the mentioned error. I have nu defined in transportProperties so I could not understand why it is complaining about.

Thanks a lot for your help in advance and Best,
Mahdi
Masgar is offline   Reply With Quote

Old   November 30, 2014, 06:08
Default
  #25
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

As you did not post you code, I will try to guess. Here's a snippet from createFields.H (from icoFoam)

Code:
...
    dimensionedScalar nu
    (
        transportProperties.lookup("nu")
    );
...
I.e. your nu is just a scalar while porosity code expects volScalarField.

And as...
  1. The tutorial, you've mentioned, is for OF 2.1.x. Porosity code was changed in the newer versions.
  2. There's pimpleDyMFoam solver which a) deals with the moving mesh b) has ability to set porosity via fvOptions mechanism, c) can be configured to behave like icoFoam, d) was tested by community
I don't see the real reason you need to mess with your own solver.
alexeym is offline   Reply With Quote

Old   November 30, 2014, 06:28
Default
  #26
New Member
 
Mahdi
Join Date: Sep 2013
Posts: 11
Rep Power: 12
Masgar is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

As you did not post you code, I will try to guess. Here's a snippet from createFields.H (from icoFoam)

Code:
...
    dimensionedScalar nu
    (
        transportProperties.lookup("nu")
    );
...
I.e. your nu is just a scalar while porosity code expects volScalarField.

And as...
  1. The tutorial, you've mentioned, is for OF 2.1.x. Porosity code was changed in the newer versions.
  2. There's pimpleDyMFoam solver which a) deals with the moving mesh b) has ability to set porosity via fvOptions mechanism, c) can be configured to behave like icoFoam, d) was tested by community
I don't see the real reason you need to mess with your own solver.

Hi Alexey,

Thank you so much for the quick and perfect reply on Sunday
I just changed the createFields.H and added nu as a volScalarField and then added new file of nu to 0 folder as the boundary condition, now it is running. Is this solution acceptable?

By the way, pimpleDyMFoam should be also fine for my purpose; however, I did'nt know that it is able to set porosity with fvOptions! Could you please let me know how I could set porosity with fvOptions? Is there any tutorial that I could refer to?
Just one other point, I am using foam-extend-3.1 and when I checked UEqn.H of pimpleDyMFoam or pimpleFoam, there is no fvOptions added to the momentum equation, while there is such a thing in e.g. OF2.3! Does it mean that it is not possible to use fvOptions in extended version?

Thanks and Best,
Mahdi
Masgar is offline   Reply With Quote

Old   November 30, 2014, 07:47
Default
  #27
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Quote:
Originally Posted by Masgar View Post
Thank you so much for the quick and perfect reply on Sunday
I just changed the createFields.H and added nu as a volScalarField and then added new file of nu to 0 folder as the boundary condition, now it is running. Is this solution acceptable?
I don't know. If it solves your problem - guess - laminar flow through the porous media with changing geometry (and these geometry changes are just deformation of the mesh).

Quote:
By the way, pimpleDyMFoam should be also fine for my purpose; however, I did'nt know that it is able to set porosity with fvOptions! Could you please let me know how I could set porosity with fvOptions? Is there any tutorial that I could refer to?
You can find examples of explicitPorositySource setup in this thread (messages 10 and 11). Though it was used with porousInterFoam, you can get the idea on how to set up fvOptions for simulation.

Quote:
Just one other point, I am using foam-extend-3.1 and when I checked UEqn.H of pimpleDyMFoam or pimpleFoam, there is no fvOptions added to the momentum equation, while there is such a thing in e.g. OF2.3! Does it mean that it is not possible to use fvOptions in extended version?
Checked sources of foam-extend 3.1 and it seems there's no fvOptions in the extend version. Also code from tutorial will work in FE 3.1 (here's a snippet from porousSimpleFoam's createFields):

Code:
    porousZones pZones(mesh);
    Switch pressureImplicitPorosity(false);
while in OF 2.3 the code is a little bit different:

Code:
    IOporosityModelList pZones(mesh);
    Switch pressureImplicitPorosity(false);
Masgar likes this.
alexeym is offline   Reply With Quote

Old   February 21, 2015, 12:36
Default similar error
  #28
New Member
 
Join Date: Feb 2015
Posts: 3
Rep Power: 11
piattu is on a distinguished road
Hello to everybody this is my first post on CFD-online.

I'm having trouble with a similar error like those discussed in #1 and #5.

I'm trying to run the wiggleyhull tutorial from OF2.2x using OF2.3 and LTSInterFoam solver. Starting the solver leads to the following error:

Code:
--> FOAM FATAL ERROR: 

    request for volScalarField alpha1 from objectRegistry region0 failed
    available objects of type volScalarField are

20
(
rSubDeltaT
alpha.water_0
interfaceProperties:K
nut
alpha.water
rho
k
p_rgh
nu
gh
nu1
rDeltaT
p
rho_0
nu2
alpha.air
k_0
omega
omega_0
y
)


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

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&)SCANs: realpath [/Volumes/OpenFOAM-v2.3.x/OpenFOAM-2.3.x/which mpicc] failed with errno 62 (Too many levels of symbolic links)
SCANs: realpath [/Volumes/OpenFOAM-v2.3.x/OpenFOAM-2.3.x/which mpicc] failed with errno 62 (Too many levels of symbolic links)
 in "libOpenFOAM.dylib"
Abort trap: 6
The DTC tutorial using the same solver and OF2.3 works without any errors.
Any ideas on how to solve this problem will be appreciated!
piattu is offline   Reply With Quote

Old   June 6, 2016, 11:02
Question Error -porousInterFoam in porousDamBreak Tutorial
  #29
New Member
 
Edinburgh
Join Date: May 2016
Posts: 1
Rep Power: 0
umerjutt is on a distinguished road
Please help me in this error. I checked the files again and again but didn't find any mistake. I will be really helpful for me if you can tell me the fix?

--> FOAM FATAL IO ERROR:
Cannot find patchField entry for porosityWall

file: /home/umer/OpenFOAM/OpenFOAM-2.4.0/umer-2.4.0/run/porousDamBreak/0/p_rgh.boundaryField from line 25 to line 55.

From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&)
in file /home/umer/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 209.

FOAM exiting

Regards,
Umer
umerjutt is offline   Reply With Quote

Old   April 28, 2017, 06:15
Default
  #30
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Hello,
I am using twoPhaseeEulerFoam and want to porous media into it. I tried to add explicitPorositySource using fvOptions and its working fine but i want add relative permeability into DarcyForchheimer model and for that i want to use this simple relation e.g. K =kkra. Do you have any idea how can i change the DarcyForchheimer model. Please help or any suggestion?

Umer
us7 is offline   Reply With Quote

Old   April 28, 2017, 06:19
Default
  #31
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Hello,
I am using twoPhaseeEulerFoam and want to add porous media into it. I tried to add explicitPorositySource using fvOptions and its working fine but i want to add relative permeability into DarcyForchheimer model and for that i want to use this simple relation e.g. K =kkra. Do you have any idea how can i change the DarcyForchheimer model. Please help or any suggestion?

Umer
us7 is offline   Reply With Quote

Old   May 4, 2017, 11:23
Default
  #32
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Hello,
I am looking for help related to explicit source term > DarcyForchheimer (porosityModel).

What i am trying to do: -available source term for DarcyForchheimer is Si = -(μ D + 1/2ρ|u|F)ui where D = 1/K , K= intrinsic permeability

-Trying to add is K--> KKri in case of two phase for relative permeability if Kri=alphai^2 then source term will become
Si = -(μ D/(alphai*alphai) + 1/2ρ|u|F)ui
In short i just want to divide D with alpha^2 and alpha value should be coming from the actual solver that is twoPhaseEulerfoam.


How can i link this alphai with solver (twophaseEulerFoam) so it starts taking values( of alpha1 & alhpa2) from the solver. so far i tried this as you recommended

>modified DarcyForchheimerTemplate.C by changing mu[cellI]*dZones[j]/(alpha[cellI]*alpha[cellI]) + (rho[cellI]*mag(U[cellI]))*fZones[j];

>modified DarcyForchheimer.H by adding "Declared const scalarField& alpha"

but i am getting this error.

/home/umer/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/runTimeSelectionTables.H:76:66: error: invalid new-expression of abstract class type ‘Foam:orosityModels:arcyForchheimer’

Full image of error is attached

Kind Regards,
Umer
Attached Images
File Type: jpg Capture.jpg (155.2 KB, 10 views)
us7 is offline   Reply With Quote

Old   October 19, 2017, 16:16
Default
  #33
New Member
 
Guillaume
Join Date: Oct 2017
Posts: 8
Rep Power: 8
gdum is on a distinguished road
Hi,

I have the same king of error:
"
request for dictionary transportProperties from objectRegistry region0 failed
available objects of type dictionary are

11
(
MRFProperties
radiationProperties
turbulenceProperties
fvSchemes
fvOptions
fvSolution
thermophysicalProperties
data
reactingCloud1Properties
combustionProperties
reactingCloud1OutputProperties
)


From function const Type& Foam:bjectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::IOdictionary]
in file /home/ubuntu/OpenFOAM/OpenFOAM-5.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::IOdictionary const& Foam:bjectRegistry::lookupObject<Foam::IOdiction ary>(Foam::word const&) const at ??:?
#3 Foam::incompressible::alphatJayatillekeWallFunctio nFvPatchScalarField::updateCoeffs() at ??:?
#4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/simpleReactingParcelFoam"
#5 Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foa m::CompressibleTurbulenceModel<Foam::fluidThermo> > >::correctNut() at ??:?
#6 Foam::RASModels::realizableKE<Foam::EddyDiffusivit y<Foam::ThermalDiffusivity<Foam::CompressibleTurbu lenceModel<Foam::fluidThermo> > > >::correctNut(Foam::GeometricField<Foam::Tensor<do uble>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7 Foam::RASModels::realizableKE<Foam::EddyDiffusivit y<Foam::ThermalDiffusivity<Foam::CompressibleTurbu lenceModel<Foam::fluidThermo> > > >::correctNut() at ??:?
#8 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/simpleReactingParcelFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/simpleReactingParcelFoam"
Aborted (core dumped)
guillaume@guillaume-VirtualBox:~/OpenFoam/Spray"

I am running simpleReactingParcelFoam to simulate a spray in a pipe.

Can someone help me? Any Idea would be more than welcome.

Regards,

Guillaume
gdum is offline   Reply With Quote

Old   March 14, 2018, 08:20
Default Porous media doesnt run,its gives error
  #34
New Member
 
Felicity
Join Date: Jan 2018
Location: South Africa
Posts: 3
Rep Power: 8
FelicityNWU is on a distinguished road
Hello Everyone

I`m sorry to resurrect the old topic,but im stuck.

Im trying to characterize distributor plate in a fluidized bed using porous media but i get an error and the solver ignores the porous media completely. I am using twoPhaseEulerFoam solver and the properties of the porous Media is similar to that of angledimplicitduct.

Anyone has an idea on how i can solve that,please help.

thanks in advance.
FelicityNWU 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
How to model granular flow through porous media Axius FLUENT 2 August 7, 2014 10:34
compressible flow through porous media Chirag2302 FLUENT 0 March 2, 2012 23:13
Testing the integrity of POROUS media and por jump Azman FLUENT 0 July 31, 2006 11:11
Two phase flow in porous media Madhavi Krishnan FLUENT 3 June 6, 2005 05:52
Simulation of Porous Media Flow Sharad Dugad FLUENT 0 December 24, 2001 01:57


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