|
[Sponsors] |
request fo volVectorField U.particles from objectRegistry regin0 failed-TwoPhaseEuler |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 4, 2020, 16:38 |
request fo volVectorField U.particles from objectRegistry regin0 failed-TwoPhaseEuler
|
#1 |
New Member
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 12 |
Hi Foamers,
I need to get access to U.particles in order to calculate the shear rate somewhere inside the viscosity model for twoPhaseEulerFoam solver. I use the following object registry utility for U field as : const volVectorField& U = this ->db().objectRegistry::lookupObject<volVectorField> ("U.particles"); The problem, however, arises when I call U.particles for twoPhaseEulerFoam solver getting the following error message: --> FOAM FATAL ERROR: request for volVectorField U.particles from objectRegistry region0 failed available objects of type volVectorField are 0() I am pretty sure that the process of the U object registry is fine since other two-phase solvers (e.g. compressibleInterFoam) reads U field from 0/. folder through applying the same viscosity model. I used the mentioned registry for all the twoPhaseEulerFoam/tutorials, but none of them read volVectorField U from 0/ but compressibleInterFoam/tutorials work fine. Plus, comparing creatFields.H for two multiphase solvers (e.g compressibleInterFoam with twoPhaseEulerFoam) shows a major difference in the field declaration order that could be the possible reason for the problem. any suggestions would be greatly appreciated. |
|
August 6, 2020, 15:16 |
|
#2 |
New Member
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 12 |
I Solved the problem using the following procedure:
1- Since the object registry of U field is required for calculating of the shear rate (SR), it would be more efficient to use the available U field inside the twoPhaseEuler.C (not inside the thermophysical model) 2- As the shear rate (SR) is calculated inside the main solver, it can be easily transferred to the needed address (e.g. thermophysicalModels/basic/heRhoThermo/viscosity_calculation) |
|
January 28, 2021, 11:52 |
|
#3 | |
New Member
Niko
Join Date: Jan 2021
Posts: 3
Rep Power: 5 |
Quote:
Hello Hamed, I try to do the same thing and I am stuck at the same part as you did. Can you explain your solution more detailled and maybe share your /basic, /specie and the twoPhaseEuler solver in case you modified something there? Thank you very much for the help, Niko |
||
July 7, 2021, 04:31 |
A non-newtonian viscosity for thermophysicalModels
|
#4 | |
New Member
anamika
Join Date: Jul 2021
Posts: 3
Rep Power: 5 |
Quote:
Hello Hamed, I am also trying to use viscosity as a function of shear rate and phase fraction. I went through your suggestion but still getting a compilation error. I request you to please do share a your heRhoThermo.C and main Solver.C file. It would be a great help. Thank you. |
||
October 9, 2021, 15:25 |
Viscosity as A Function of Shear Rate in TwoPhaseEulerFoam
|
#5 | |
New Member
anamika
Join Date: Jul 2021
Posts: 3
Rep Power: 5 |
Quote:
It would be a great help if you can help me to figure it out. Hoping for the best! Thank you in advance. Regards, Anamika |
||
May 24, 2023, 09:13 |
|
#6 | |
New Member
riccardo
Join Date: Mar 2023
Posts: 7
Rep Power: 3 |
Quote:
--> FOAM FATAL ERROR: request for volVectorField U from objectRegistry region0 failed available objects of type volVectorField are 0() From function const Type& Foam:bjectRegistry::lookupObject(const Foam::word&, bool) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>] How did you solve it exactly? I am calling U in the function heRhoThermo as well as the strainrate sr. The compilation was fine, however when doing a simulation the U volvectorfield seem to not be available. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel | U.Golling | OpenFOAM Running, Solving & CFD | 52 | September 23, 2023 04:35 |
Initial conditions for uniform flow | andreas | OpenFOAM | 5 | November 16, 2012 16:00 |
[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 |