CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Adsorption solver (https://www.cfd-online.com/Forums/main/244905-adsorption-solver.html)

Lucky September 4, 2022 07:33

Adsorption solver
 
Hie foamers, i am trying to use chtMultiregionFoam to model adsorption and also using
Code:

adsorptionMassFractionFvPatchScalarField
for the adsorptive wall boundary condition. I am however facing getting the following error when i run my case.


Code:

Solving for solid region solid
GAMG:  Solving for e, Initial residual = 0.0213801, Final residual = 0.00260509, No Iterations 1000
Min/max T:300 300

Solving for solid region adsorptwall
[5]
[5] [0]
[0]
[0] --> FOAM FATAL ERROR:
[0]
    request for surfaceScalarField phi from objectRegistry adsorptwall failed
    available objects of type surfaceScalarField are
0()
[0]
[0]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]
[0]    in file /opt/openfoam10/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line [1]
[1]
[1] --> FOAM FATAL ERROR:
[1]
    request for surfaceScalarField phi from objectRegistry adsorptwall failed
    available objects of type surfaceScalarField are
0()
[1]
[1]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]
[1]    in file /opt/openfoam10/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 211.
[4]


I have tried all the other fixes i have found on the forum and nothing works for me. Someone help please.



for the velocity boundary condition and temperature conditions on the adsorptive wall i used
Code:

specieTransferVelocityFvPatchVectorField

and



Code:

specieTransferTemperatureFvPatchScalarField

respectively.



anyone please help

LuckyTran September 4, 2022 07:39

Code:

    request for surfaceScalarField phi from objectRegistry adsorptwall failed
  available objects of type surfaceScalarField are

The error is it is looking for the phi field and cannot find it in the list of available fields. And it shouldn't because ordinarily the velocity on the boundary is zero and there is no mass flux. What have you done to the solver?


Btw the objectRegistry is declared in createFields.H, which for MultiregionFoam will instead call createFluidFields.H and createSolidFields.H
you will find there is an IOobject for phi in createFluidFields and not in createSolidFields


If your custom code requires reading from the field phi then you need to add it to createSolidFields, but you will need to make sure that phi is actually computed in solid regions elsewhere in the code. There is an entire chain of changes you must make if phi is involved in whatever it is you are trying to do.

Lucky September 4, 2022 07:49

Thank you for the quick response.


I have created two solid regions and one fluid region. The adsorptwall is the monolith inside the cylinder where adsorption is taking place. I have. Have tried defining phi in the createSolidFields but that was causing even more complicated errors.



I noticed that for specieTransferVelocity boundary condition, It has a function calcPhiYp which is also used in the boundary condition adsorption mass fraction and i couldnt locate that function anywhere?. I am using openFoam10


All times are GMT -4. The time now is 11:58.