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

Accessing "pimple" object from within the updateCoeffs()

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2016, 15:13
Default Accessing "pimple" object from within the updateCoeffs()
  #1
New Member
 
jp279
Join Date: Jul 2015
Posts: 9
Rep Power: 11
jp279 is on a distinguished road
Send a message via Skype™ to jp279
Hello everyone,
I am trying to develop a new boundary condition which is a modified version of a fixed BC. Here, I also read a scalarField H as follows :

top
{
type newBC;
value uniform 1;
H uniform 0.0; // scalarField
}

After reading this scalarField H, I update it (by adding some constant to it) for each time step in the newBC.C file as follows:

H += someConstantScalarField; ... (1)

And then I use this H to compute the value at this boundary.

The problem is that, since I am using a PIMPLE solver, if I use (1) it updates it for all the iterations of the PIMPLE loop of that particular time step. In other words, I want to perform (1) just once for a time step and use that updated H for all the PIMPLE iterations within this time step. Something like -

// if(new time iteration?) OR if(last innermost iteration of pimple?)
{
H += someConstantScalarField; ... (1)
}

How can I access the "pimple" object (defined in the solver) from within the updateCoeffs() member function of a boundary condition?

Kindly, let me know if you have any suggestions.
jp279 is offline   Reply With Quote

Old   July 2, 2020, 06:19
Default
  #2
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by jp279 View Post
Hello everyone,
I am trying to develop a new boundary condition which is a modified version of a fixed BC. Here, I also read a scalarField H as follows :

top
{
type newBC;
value uniform 1;
H uniform 0.0; // scalarField
}

After reading this scalarField H, I update it (by adding some constant to it) for each time step in the newBC.C file as follows:

H += someConstantScalarField; ... (1)

And then I use this H to compute the value at this boundary.

The problem is that, since I am using a PIMPLE solver, if I use (1) it updates it for all the iterations of the PIMPLE loop of that particular time step. In other words, I want to perform (1) just once for a time step and use that updated H for all the PIMPLE iterations within this time step. Something like -

// if(new time iteration?) OR if(last innermost iteration of pimple?)
{
H += someConstantScalarField; ... (1)
}

How can I access the "pimple" object (defined in the solver) from within the updateCoeffs() member function of a boundary condition?

Kindly, let me know if you have any suggestions.
Hi,

It's a pretty old post, however I have faced the same issue. How can I access pimple control in my own boundary condition?

Kind regards,
syavash
syavash is offline   Reply With Quote

Reply


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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 07:55
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 15:56
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
Compilation error OF1.5-dev on Suse10.3 darenyang OpenFOAM Installation 0 April 29, 2009 05:55
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36


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