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

PIMPLE iterations in the implementation of boundary condition

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 28, 2025, 04:31
Default PIMPLE iterations in the implementation of boundary condition
  #1
New Member
 
Filippo
Join Date: Mar 2023
Posts: 4
Rep Power: 4
Filippo70 is on a distinguished road
Hi foamers.

I'm working on the implementation of a pressure boundary condition in OpenFoam2012 and would like to update it at the conclusion of the inner pimple cycle (finalInnerIteration). Is it feasible to perform this within a boundary condition?

I noticed that, from the pimple.C file, the object 'pimple' comes from 'createPimpleControl.H' and depends on 'mesh':

Code:
 pimpleControl pimple(mesh)
but if i obtain mesh information and create the 'pimple' object with:

Code:
 
fvMesh& mesh = this->patch().boundaryMesh().mesh();
pimpleControl pimple(mesh);


I receive this error:

In instantiation of ‘void Foam:: pressureInletOutletWkFvPatchField<Type>::updateCoe ffs() [with Type = Foam::Tensor<double>]’:
pressureInletOutletWkFvPatchField.C:163:6: required from here
pressureInletOutletWkFvPatchField.C:172:18: error: binding reference of type ‘Foam::fvMesh&’ to ‘const Foam::fvMesh’ discards qualifiers
172 | pimpleControl pimple(mesh);


I believe this is related to the fact that the pimpleControl constructor expects a non-const object.

Thank you in advance for your response.
Filippo70 is offline   Reply With Quote

Old   February 6, 2025, 10:50
Default
  #2
New Member
 
Filippo
Join Date: Mar 2023
Posts: 4
Rep Power: 4
Filippo70 is on a distinguished road
After many attempts I solved the problem with the following lines of code:
Code:
const pimpleControl& pc = db().lookupObject<pimpleControl>
(
      "solutionControl"
);
After that, i'm able to call all the functions contain in "pimpleControl.H".


Perhaps these last lines of code may also be useful to others.
Filippo70 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
laplacianFoam with source term Herwig OpenFOAM Running, Solving & CFD 17 November 19, 2019 13:47
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
SLTS+rhoPisoFoam: what is rDeltaT??? nileshjrane OpenFOAM Running, Solving & CFD 4 February 25, 2013 04:13


All times are GMT -4. The time now is 07:42.