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

request fo volVectorField U.particles from objectRegistry regin0 failed-TwoPhaseEuler

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 4, 2020, 16:38
Default request fo volVectorField U.particles from objectRegistry regin0 failed-TwoPhaseEuler
  #1
New Member
 
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 9
Hamed1117 is on a distinguished road
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.
Hamed1117 is offline   Reply With Quote

Old   August 6, 2020, 15:16
Default
  #2
New Member
 
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 9
Hamed1117 is on a distinguished road
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)
Hamed1117 is offline   Reply With Quote

Old   January 28, 2021, 11:52
Default
  #3
New Member
 
Niko
Join Date: Jan 2021
Posts: 3
Rep Power: 2
NFisc is on a distinguished road
Quote:
Originally Posted by Hamed1117 View Post
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)

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
NFisc is offline   Reply With Quote

Old   July 7, 2021, 04:31
Default A non-newtonian viscosity for thermophysicalModels
  #4
New Member
 
anamika
Join Date: Jul 2021
Posts: 3
Rep Power: 2
Anamika is on a distinguished road
Quote:
Originally Posted by Hamed1117 View Post
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)



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.
Anamika is offline   Reply With Quote

Old   October 9, 2021, 15:25
Default Viscosity as A Function of Shear Rate in TwoPhaseEulerFoam
  #5
New Member
 
anamika
Join Date: Jul 2021
Posts: 3
Rep Power: 2
Anamika is on a distinguished road
Quote:
Originally Posted by Hamed1117 View Post
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)
Hello Hamed, I am still figuring out if you have used U1 or U2 as an available U field to calculate SR. I used the U1 velocity field in the main solver and the solver got compiled successfully but it shows an error as the "SR.particle" file is missing.

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
Attached Images
File Type: jpg Fig.jpg (65.3 KB, 7 views)
Anamika is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 46 March 25, 2021 06:28
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


All times are GMT -4. The time now is 16:01.