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

pimple corr reset

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2015, 10:14
Default pimple corr reset
  #1
Senior Member
 
Daniel Witte
Join Date: Nov 2011
Posts: 148
Rep Power: 14
danny123 is on a distinguished road
Hello

Pimple.loop() is a flag that is true as long the pimple loops runs. If have added additional booleans to it to improve some stuff like stopping the loop if there is no convergence. The problem now is that corr_ is not reset to zero. I have tried something like:

Code:
pimple.corr() = 0;
but this object cannot be overwritten. corr() is also defined in solutionControl.H , but I have not found how it can be reset.

Thanks if somebody could give me a hint.

Regards,

Daniel
danny123 is offline   Reply With Quote

Old   June 19, 2015, 12:24
Default
  #2
Senior Member
 
Daniel Witte
Join Date: Nov 2011
Posts: 148
Rep Power: 14
danny123 is on a distinguished road
Since nobody seems to be interested on this topic, I found a solution myself, however not that elegant. I just copied the loop() object in pimpleControl.C and created a new one like this:

Code:
bool Foam::pimpleControl::resetcorr()
{
    read();

    corr_=0;

    return false;
}
Obviously this object needs to be declared in pimpleControl.H too. You then can just call it in the application solver and it resets corr to 0.

I do not check if the read statement is really necessary, but at least it does not hurt. If there is a better way, please post it.
danny123 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
error while running modified pimple solver R_21 OpenFOAM Programming & Development 0 May 28, 2015 07:59
A question on the PIMPLE algorithm GerhardHolzinger OpenFOAM Running, Solving & CFD 4 February 13, 2015 07:49
questions about pimple !! 1988 OpenFOAM Pre-Processing 4 July 1, 2014 03:57
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 11:08
why PIMPLE doesn't converge at each time step but no diverging? immortality OpenFOAM Running, Solving & CFD 7 May 19, 2013 15:16


All times are GMT -4. The time now is 05:55.