|
[Sponsors] |
October 20, 2010, 12:40 |
applyConstraintsAndThermostats
|
#1 |
Member
Mehdi
Join Date: Oct 2009
Posts: 61
Rep Power: 16 |
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;
}
}
Thanks |
|
|
|