Merge branch 'molecularDynamics'

This commit is contained in:
andy
2009-07-07 16:46:17 +01:00
5 changed files with 35 additions and 15 deletions

View File

@ -507,7 +507,7 @@ void Foam::moleculeCloud::initialiseMolecules
else
{
const dictionary& zoneDict =
mdInitialiseDict.subDict(zone.name());
mdInitialiseDict.subDict(zone.name());
const scalar temperature
(
@ -530,7 +530,7 @@ void Foam::moleculeCloud::initialiseMolecules
{
FatalErrorIn("Foam::moleculeCloud::initialiseMolecules")
<< "latticeIds and latticePositions must be the same "
<< " size." << nl
<< " size." << nl
<< abort(FatalError);
}
@ -548,6 +548,15 @@ void Foam::moleculeCloud::initialiseMolecules
zoneDict.lookup("numberDensity")
);
if (numberDensity < VSMALL)
{
WarningIn("moleculeCloud::initialiseMolecules")
<< "numberDensity too small, not filling zone "
<< zone.name() << endl;
continue;
}
latticeCellScale = pow
(
latticeIds.size()/(det(latticeCellShape)*numberDensity),
@ -572,9 +581,19 @@ void Foam::moleculeCloud::initialiseMolecules
zoneDict.lookup("massDensity")
);
if (massDensity < VSMALL)
{
WarningIn("moleculeCloud::initialiseMolecules")
<< "massDensity too small, not filling zone "
<< zone.name() << endl;
continue;
}
latticeCellScale = pow
(
unitCellMass /(det(latticeCellShape)*massDensity),
unitCellMass/(det(latticeCellShape)*massDensity),
(1.0/3.0)
);
}
@ -906,7 +925,7 @@ void Foam::moleculeCloud::initialiseMolecules
)
{
WarningIn("Foam::moleculeCloud::initialiseMolecules()")
<< "A whole layer of unit cells was placed "
<< "A whole layer of unit cells was placed "
<< "outside the bounds of the mesh, but no "
<< "molecules have been placed in zone '"
<< zone.name()

View File

@ -5,11 +5,11 @@
application="mdEquilibrationFoam"
# cd periodicCubeArgon
# runApplication blockMesh
# runApplication mdInitialise
# runApplication $application
# cd ..
cd periodicCubeArgon
runApplication blockMesh
runApplication mdInitialise
runApplication $application
cd ..
cd periodicCubeWater
runApplication blockMesh

View File

@ -14,6 +14,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
equilibrationTargetTemperature 300.0;
targetTemperature 300.0;
// ************************************************************************* //

View File

@ -20,7 +20,7 @@ startTime 0;
stopAt endTime;
endTime 1e-10;
endTime 5e-12;
deltaT 1e-15;

View File

@ -27,7 +27,7 @@ FoamFile
sectionA
{
massDensity 980;
massDensity 1004;
temperature 298;
bulkVelocity (0.0 0.0 0.0);
latticeIds
@ -46,7 +46,7 @@ sectionA
sectionB
{
massDensity 980;
massDensity 1004;
temperature 298;
bulkVelocity (0.0 0.0 0.0);
latticeIds
@ -65,7 +65,7 @@ sectionB
sectionC
{
massDensity 980;
massDensity 1004;
temperature 298;
bulkVelocity (0.0 0.0 0.0);
latticeIds