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

request for volVectorField U from objectRegistry region0 failed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 16, 2024, 10:22
Default request for volVectorField U from objectRegistry region0 failed
  #1
New Member
 
Deny
Join Date: May 2024
Posts: 11
Rep Power: 2
Chintan-21 is on a distinguished road
Hello, Good Morning to all


I am simulating multi-phase flow using the multiphaseEuler solver. I have setup all the files but I am getting the following error:

I tried to change the boundary condition but nothing happened.


Any help will greatly appreciated.


Thank you



--> FOAM FATAL ERROR:

request for volVectorField U from objectRegistry region0 failed
available objects of type volVectorField are

9
(
DUDt.liquid
U.liquid_0
KdU.gas
U.gas_0
DUDt.gas
U.gas
Cc
U.liquid
KdU.liquid
)


Here is my U.gas file


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//velocity of liquid phase

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0); //zero initial velocity in domain.

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

walls
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //



U.liquid file


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//velocity of liquid phase

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0); //zero initial velocity in domain.

boundaryField
{
inlet
{
type zeroGradient;
}

outlet
{
type zeroGradient;
}

walls
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //



alpha.gas


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object alpha.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//volumetric fraction of gas

dimensions [0 0 0 0 0 0 0];

internalField uniform 0; //initiall zero gas in the domain

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.14914;
}
outlet
{
type inletOutlet;
phi phi.gas;
inletValue uniform 1;
value uniform 1;
}
walls
{
type zeroGradient;
}
}


// ************************************************** *********************** //





alpha.liquid


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0";
object alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//volumetric fraction of liquid

dimensions [0 0 0 0 0 0 0];

internalField uniform 1; //domain is initially all liquid

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.85086;
}
outlet
{
type inletOutlet;
phi phi.liquid;
inletValue uniform 0;
value uniform 0;
}
walls
{
type zeroGradient;
}
}


// ************************************************** *********************** //



P file


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 1.01e5; //set this to atmospheric. the inlet pressure will auto-regulate

boundaryField
{
inlet
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
walls
{
type calculated;
value $internalField;
}
}

// ************************************************** *********************** //



p_rgh file


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 1.01e5; //set this to atmospheric. the inlet pressure will auto-regulate

boundaryField
{
inlet
{
type prghTotalPressure;
p0 uniform 1.15e5;
value uniform 1.15e5;

/* type fixedFluxPressure;*/
/* value $internalField;*/
}


outlet
{
type prghPressure;
p uniform 1e5;
value uniform 1e5;
}


walls
{
type zeroGradient;

/* type fixedFluxPressure;*/
/* value $internalField;*/
}
}

// ************************************************** *********************** //


fvSolution file


/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
"alpha.*"
{
nAlphaCorr 1;
nAlphaSubCycles 3; //3
}

p_rgh
{
solver PBiCGStab;
preconditioner DIC;
tolerance 1e-11; /// reduce to 10 original was 12
relTol 0.001;
}

p_rghFinal
{
$p_rgh;
relTol 0;
}

"U.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-12;
relTol 0;
}

"(e|h).*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-12;
relTol 0;
}

"Yi.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-12;
relTol 0;
}
}

PIMPLE
{
nOuterCorrectors 5; //0 original was 5
nCorrectors 1;
nNonOrthogonalCorrectors 10; //0 original was 1

faceMomentum no;
VmDdtCorrection yes;
dragCorrection yes;
partialElimination no;

// changed below

outerCorrectorResidualControl
{
p_rgh
{
relTol 0;
tolerance 0.0001;
}
}

}

relaxationFactors
{
equations
{
".*" 0.9;
}
}


// ************************************************** *********************** //




Thank you in advance.


Regards

Chintan
Chintan-21 is offline   Reply With Quote

Old   August 21, 2024, 09:14
Default
  #2
Member
 
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 57
Rep Power: 10
amirhosseintaran is on a distinguished road
Hi Deny,


Quote:
--> FOAM FATAL ERROR: request for volVectorField U from objectRegistry region0 failed
available objects of type volVectorField are

9
(
DUDt.liquid
U.liquid_0
KdU.gas
U.gas_0
DUDt.gas
U.gas
Cc
U.liquid
KdU.liquid
)
This error simply means that somewhere in the solution, you are requesting for U, whereas there is no object called U in your case. Apart from files in 0/ directory, can you tell me whats heppening in the code?

Did you add/change a library to look for an object called U?

Regards,
Amir.
amirhosseintaran is offline   Reply With Quote

Old   August 21, 2024, 14:48
Default
  #3
New Member
 
Deny
Join Date: May 2024
Posts: 11
Rep Power: 2
Chintan-21 is on a distinguished road
Thank you Amir for your help.




But I haven't changed any library but I initialized my multi phase simulation using the incompressible solver and I am still getting the same error.

If you need the simulation file then I can upload it here.

Thank you for your help.!


Regards

Chintan
Chintan-21 is offline   Reply With Quote

Old   August 22, 2024, 04:05
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Can you show your controlDict file? Don't you have a function object there requesting U?

Yann
Yann is offline   Reply With Quote

Old   August 22, 2024, 07:00
Default
  #5
Member
 
Amirhossein Taran
Join Date: Sep 2016
Location: Dublin, Ireland
Posts: 57
Rep Power: 10
amirhosseintaran is on a distinguished road
Quote:
Originally Posted by Chintan-21 View Post
Thank you Amir for your help.




But I haven't changed any library but I initialized my multi phase simulation using the incompressible solver and I am still getting the same error.

If you need the simulation file then I can upload it here.

Thank you for your help.!


Regards

Chintan

Hi Chintan,

Yes that would be helpful to see whats happening. Also, what is multiphase simulation and what is incompressible solver? maybe that incompressible solver is requesting for U, and since it is a multiphase case, it couldnt find anything called U.

Reagrds,
Amir.
amirhosseintaran is offline   Reply With Quote

Old   August 22, 2024, 17:34
Default
  #6
New Member
 
Deny
Join Date: May 2024
Posts: 11
Rep Power: 2
Chintan-21 is on a distinguished road
Hello Yann, Thank you for looking at my question! and helping me to solve problem.



I have checked my controlDict but I have no idea why I am getting the error.


for your reference I have pasted here my controlDict.

ControlDict

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 11
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application foamRun;

solver multiphaseEuler;

startFrom startTime; //startTime;

startTime 0;

stopAt endTime;

endTime 10; // original was 10

deltaT 0.0000001; /// chaged original was 0.0000001

writeControl runTime;

writeInterval 0.001; // origianl was 0.001

purgeWrite 0;

writeFormat ascii;

writePrecision 10;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.05; // original was 0.1

maxDeltaT 1;

functions
{
surfaceFieldValue1 //this one is for the outlet
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled yes;
writeControl timeStep;
writeInterval 100; //writes every 10 time steps. edit as necessary
log yes;
writeFields no;
regionType patch;
name outlet;
operation average;
weightField phi;
fields
(
U.liquid
U.gas
O2.gas
O2.liquid
N2.gas
N2.liquid
alpha.gas
alpha.liquid
);
}

surfaceFieldValue2 //this one is for the inlet
{
type surfaceFieldValue;
libs ("libfieldFunctionObjects.so");
enabled yes;
writeControl timeStep;
writeInterval 100; //writes every 10 time steps. edit as necessary
log yes;
writeFields no;
regionType patch;
name inlet;
operation average;
weightField phi;
fields
(
U.liquid
U.gas
O2.gas
O2.liquid
N2.gas
N2.liquid
alpha.gas
alpha.liquid
);
}

}


// ************************************************** *********************** //




Thank you for your help


Regards
Chintan
Chintan-21 is offline   Reply With Quote

Reply

Tags
multi phase, multiphaseeulerfaom, objectregistry, volvectorfield


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
Paraview 5.10.1 - error - openfoam 11 - ubuntu 22.04 lts gu1 OpenFOAM Bugs 5 July 29, 2024 11:50
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 52 September 23, 2023 04:35
[OpenFOAM] ParaView/Parafoam error when making animation Disco_Caine ParaView 6 September 28, 2010 10:54
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 14:43.