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

applyConstraintsAndThermostats

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 20, 2010, 12:40
Question applyConstraintsAndThermostats
  #1
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
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, 12:46
Default
  #2
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
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, 12:50
Default
  #3
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
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, 12:53
Default
  #4
Senior Member
 
Laurence R. McGlashan
Join Date: Mar 2009
Posts: 370
Rep Power: 14
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, 12:55
Default
  #5
Member
 
m.maneshi's Avatar
 
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 7
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
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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 10:44.