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

Reloading boundaries fails for wallFunction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 7, 2019, 16:59
Default Reloading boundaries fails for wallFunction
  #1
New Member
 
David
Join Date: Dec 2017
Posts: 4
Rep Power: 8
daven is on a distinguished road
Hello together,


we recently use OpenFOAM in coupled multiphysical simulations with other solvers and need to recompute certain timesteps in each solver in order to use implicit coupling algorithms. Therefore, we reload in OpenFOAM internal fields (e.g. p, U) and reevaluate the boundaries by using the OpenFOAM function correctBoundaryConditions().

Reevaluating boundaries works fine for most of the boundary condition types, but it fails for some wall function types (e.g. epsilonWallFunction), where OpenFOAM raises the following error message:
Code:
--> FOAM FATAL ERROR: 

    request for volScalarField::Internal kEpsilon:G from objectRegistry region0 failed
    available objects of type volScalarField::Internal are



23
(
thermo:mu
thermo:psi
nut
epsilon_0
K
K_0
h
p_rgh_0
rho
k
h_0
p_rgh
dpdt
gh
alphat
rho_0
p
T
k_0
p_0
thermo:rho
epsilon
thermo:alpha
)
We couldn't find a workaround, since the wallFunction is only applied for specific patches and we would like to reload all other patches, where boundaries have other (unproblematic) boundary condition types.


If you are interested in a more extensive problem description/history or like to contribute on github: This is currently an open issue in precice/openfoam-adapter#4.


Any idea or hint is very welocme!


Best regards,
David
daven is offline   Reply With Quote

Old   October 11, 2019, 06:13
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
The Problem in your case is that the field G is only known inside the turbulence model class and non in the global object registry. In order to evaluate the wallfunvions from outside the turbulence model you have to make the required fields visible globally by inserting them into the mesh database
mAlletto is offline   Reply With Quote

Old   October 13, 2019, 12:49
Default
  #3
New Member
 
David
Join Date: Dec 2017
Posts: 4
Rep Power: 8
daven is on a distinguished road
Thanks for your reply.


Do you know how to access turbulence models in general? Inserting it in the base class should not be a problem. But accessing it results in my case in an -fpermissive compiler error.
daven is offline   Reply With Quote

Old   October 13, 2019, 13:35
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
You can get a constant reference to most fields see https://www.openfoam.com/documentati...enceModel.html. I believe also to the G field
mAlletto is offline   Reply With Quote

Old   October 13, 2019, 13:37
Default
  #5
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
A and in almost all solvers there is a reference to the turbulence model. You can find an example here https://github.com/OpenFOAM/OpenFOAM...createFields.H
mAlletto is offline   Reply With Quote

Reply

Tags
bounadry condition, couple, openfaom, precice, wallfunction


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
Mapped vs Cyclic Boundaries in OpenFOAM arsenis OpenFOAM Running, Solving & CFD 1 February 8, 2023 21:13
2D Rotating Detonation Engine Periodic Boundaries whitet86 FLUENT 2 June 25, 2015 11:04
[Other] CheckMesh fails when cyclic boundaries are defined - OF 2.2.0 caduqued OpenFOAM Meshing & Mesh Conversion 2 May 21, 2013 18:31
Setting Flow/Pressure Boundaries in Floworks Eran FloEFD, FloWorks & FloTHERM 3 August 11, 2009 04:23
periodic boundaries - flow through a net PK FLUENT 0 July 12, 2007 11:58


All times are GMT -4. The time now is 17:23.