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

applyConstraintsAndThermostats

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2010, 13:40
Question applyConstraintsAndThermostats
  #1
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16
m.maneshi is on a distinguished road
Dear all
i
in OpenFOAM/OpenFOAM-1.6/src/lagrangian/molecularDynamics/molecule at line 1158 we have the constrains and thermostats, yet i cant figure out if this member function is working or not, here it is the function
HTML Code:
void Foam::moleculeCloud::applyConstraintsAndThermostats
(
    const scalar targetTemperature,
    const scalar measuredTemperature
)
{
    scalar temperatureCorrectionFactor =
        sqrt(targetTemperature/measuredTemperature);

    Info<< "----------------------------------------" << nl
        << "Temperature equilibration" << nl
        << "Target temperature = "
        << targetTemperature << nl
        << "Measured temperature = "
        << measuredTemperature << nl
        << "Temperature correction factor = "
        << temperatureCorrectionFactor << nl
        << "----------------------------------------"
        << endl;

    iterator mol(this->begin());

    for (mol = this->begin(); mol != this->end(); ++mol)
    {
        mol().v() *= temperatureCorrectionFactor;

        mol().pi() *= temperatureCorrectionFactor;
    }
}
must not the function print the two lines every time it is called ??

Thanks
m.maneshi is offline   Reply With Quote

Old   October 20, 2010, 13:46
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
You mean the Info statements? Are you running it in parallel or in serial?
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   October 20, 2010, 13:50
Default
  #3
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16
m.maneshi is on a distinguished road
Yes i exactly mean the Info statement, i tried in both serial and parralel, no diffrence.
m.maneshi is offline   Reply With Quote

Old   October 20, 2010, 13:53
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 23
l_r_mcglashan will become famous soon enough
It won't be called then.

If you run in parallel, I think Info will only output for the master processor (correct me if wrong)? If you want it to output the results for each processor you have to use Pout instead of Info.
__________________
Laurence R. McGlashan :: Website
l_r_mcglashan is offline   Reply With Quote

Old   October 20, 2010, 13:55
Default
  #5
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16
m.maneshi is on a distinguished road
So how can i call it in the molecule.c ?
m.maneshi 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



All times are GMT -4. The time now is 15:38.