diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options
index 14f2ed2f93..89431d0625 100644
--- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options
+++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options
@@ -1,7 +1,6 @@
EXE_INC = \
-I$(LIB_SRC)/lagrangian/molecularDynamics/molecule/lnInclude \
-I$(LIB_SRC)/lagrangian/molecularDynamics/potential/lnInclude \
- -I$(LIB_SRC)/lagrangian/molecularDynamics/molecularMeasurements/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
@@ -11,6 +10,4 @@ EXE_LIBS = \
-lfiniteVolume \
-llagrangian \
-lmolecule \
- -lpotential \
- -lmolecularMeasurements
-
+ -lpotential
diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H
new file mode 100644
index 0000000000..dc88bf6e88
--- /dev/null
+++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/createFields.H
@@ -0,0 +1,17 @@
+ Info<< "\nReading field U\n" << endl;
+ volVectorField U
+ (
+ IOobject
+ (
+ "U",
+ runTime.timeName(),
+ mesh,
+ IOobject::MUST_READ,
+ IOobject::AUTO_WRITE
+ ),
+ mesh
+ );
+
+ potential pot(mesh);
+
+ polyatomicCloud molecules(mesh, pot);
diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C
index 779172803d..660c12a5b8 100644
--- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C
+++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C
@@ -30,59 +30,25 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
-#include "md.H"
+#include "polyatomicCloud.H"
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
+ #include "createFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
- Info<< "\nReading field U\n" << endl;
- volVectorField U
- (
- IOobject
- (
- "U",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
- potential pot(mesh);
-
- moleculeCloud molecules(mesh, pot);
-
- #include "temperatureAndPressureVariables.H"
-
- label nAveragingSteps = 0;
-
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
- nAveragingSteps++;
-
Info<< "Time = " << runTime.timeName() << endl;
molecules.evolve();
- #include "meanMomentumEnergyAndNMols.H"
-
- #include "temperatureAndPressure.H"
-
- runTime.write();
-
- if (runTime.outputTime())
- {
- nAveragingSteps = 0;
- }
-
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
diff --git a/src/lagrangian/molecularDynamics/Allwmake b/src/lagrangian/molecularDynamics/Allwmake
index 7c17819ad5..118ba05f1a 100755
--- a/src/lagrangian/molecularDynamics/Allwmake
+++ b/src/lagrangian/molecularDynamics/Allwmake
@@ -4,7 +4,6 @@ makeType=${1:-libso}
set -x
wmake $makeType potential
-wmake $makeType molecularMeasurements
wmake $makeType molecule
# ----------------------------------------------------------------- end-of-file
diff --git a/src/lagrangian/molecularDynamics/molecule/Make/files b/src/lagrangian/molecularDynamics/molecule/Make/files
index 9086ba7ffa..7f8abcb0f3 100644
--- a/src/lagrangian/molecularDynamics/molecule/Make/files
+++ b/src/lagrangian/molecularDynamics/molecule/Make/files
@@ -1,9 +1,8 @@
-reducedUnits/reducedUnits.C
-reducedUnits/reducedUnitsIO.C
+constPropSite/constPropSite.C
-molecule/molecule.C
-molecule/moleculeIO.C
+polyatomic/polyatomic/polyatomic.C
+polyatomic/polyatomic/polyatomicIO.C
-moleculeCloud/moleculeCloud.C
+polyatomic/polyatomicCloud/polyatomicCloud.C
LIB = $(FOAM_LIBBIN)/libmolecule
diff --git a/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.C b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.C
new file mode 100644
index 0000000000..431f37aeb4
--- /dev/null
+++ b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.C
@@ -0,0 +1,76 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ constPropSite
+
+Description
+
+\*----------------------------------------------------------------------------*/
+
+#include "constPropSite.H"
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::constPropSite::constPropSite()
+:
+ siteReferencePosition_(vector::zero),
+ siteMass_(0.0),
+ siteCharge_(0.0),
+ siteId_(0),
+ name_(),
+ pairPotentialSite_(false),
+ electrostaticSite_(false)
+{}
+
+
+Foam::constPropSite::constPropSite
+(
+ const vector& siteReferencePosition,
+ const scalar& siteMass,
+ const scalar& siteCharge,
+ const label& siteId,
+ const word& name,
+ const bool& pairPotentialSite,
+ const bool& electrostaticSite
+)
+:
+ siteReferencePosition_(siteReferencePosition),
+ siteMass_(siteMass),
+ siteCharge_(siteCharge),
+ siteId_(siteId),
+ name_(name),
+ pairPotentialSite_(pairPotentialSite),
+ electrostaticSite_(electrostaticSite)
+{}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::constPropSite::~constPropSite()
+{}
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+// ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.H b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.H
new file mode 100644
index 0000000000..0ffb63b0a8
--- /dev/null
+++ b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSite.H
@@ -0,0 +1,162 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+Class
+
+
+Description
+
+SourceFiles
+ constPropSiteI.H
+ constPropSite.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef constPropSite_H
+#define constPropSite_H
+
+#include "vector.H"
+#include "IFstream.H"
+#include "OFstream.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+
+/*---------------------------------------------------------------------------*\
+ Class constPropSite Declaration
+\*---------------------------------------------------------------------------*/
+
+class constPropSite
+{
+ // Private data
+
+ //-
+ vector siteReferencePosition_;
+
+ //-
+ scalar siteMass_;
+
+ //-
+ scalar siteCharge_;
+
+ //-
+ label siteId_;
+
+ //-
+ word name_;
+
+ //-
+ bool pairPotentialSite_;
+
+ //-
+ bool electrostaticSite_;
+
+
+public:
+
+ // Constructors
+
+ //- Construct null
+ constPropSite();
+
+ //- Construct from components
+ constPropSite
+ (
+ const vector& siteReferencePosition,
+ const scalar& siteMass,
+ const scalar& siteCharge,
+ const label& siteId,
+ const word& name,
+ const bool& pairPotentialSite,
+ const bool& electrostaticSite
+ );
+
+
+ // Selectors
+
+ // Destructor
+
+ ~constPropSite();
+
+ // Member Functions
+
+ // Access
+
+ //-
+ inline const vector& siteReferencePosition() const;
+
+ //-
+ inline vector& siteReferencePosition();
+
+ //-
+ inline const scalar& siteMass() const;
+
+ //-
+ inline scalar& siteMass();
+
+ //-
+ inline const scalar& siteCharge() const;
+
+ //-
+ inline scalar& siteCharge();
+
+ //-
+ inline const label& siteId() const;
+
+ //-
+ inline label& siteId();
+
+ //-
+ inline const word& name() const;
+
+ //-
+ inline word& name();
+
+ //-
+ inline const bool& pairPotentialSite() const;
+
+ //-
+ inline bool& pairPotentialSite();
+
+ //-
+ inline const bool& electrostaticSite() const;
+
+ //-
+ inline bool& electrostaticSite();
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#include "constPropSiteI.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSiteI.H b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSiteI.H
new file mode 100644
index 0000000000..dbeb395920
--- /dev/null
+++ b/src/lagrangian/molecularDynamics/molecule/constPropSite/constPropSiteI.H
@@ -0,0 +1,117 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration |
+ \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+
+
+Description
+
+\*---------------------------------------------------------------------------*/
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+inline const Foam::vector& Foam::constPropSite::siteReferencePosition() const
+{
+ return siteReferencePosition_;
+}
+
+
+inline Foam::vector& Foam::constPropSite::siteReferencePosition()
+{
+ return siteReferencePosition_;
+}
+
+
+inline const Foam::scalar& Foam::constPropSite::siteMass() const
+{
+ return siteMass_;
+}
+
+
+inline Foam::scalar& Foam::constPropSite::siteMass()
+{
+ return siteMass_;
+}
+
+
+inline const Foam::scalar& Foam::constPropSite::siteCharge() const
+{
+ return siteCharge_;
+}
+
+
+inline Foam::scalar& Foam::constPropSite::siteCharge()
+{
+ return siteCharge_;
+}
+
+
+inline const Foam::label& Foam::constPropSite::siteId() const
+{
+ return siteId_;
+}
+
+
+inline Foam::label& Foam::constPropSite::siteId()
+{
+ return siteId_;
+}
+
+
+inline const Foam::word& Foam::constPropSite::name() const
+{
+ return name_;
+}
+
+
+inline Foam::word& Foam::constPropSite::name()
+{
+ return name_;
+}
+
+
+inline const bool& Foam::constPropSite::pairPotentialSite() const
+{
+ return pairPotentialSite_;
+}
+
+
+inline bool& Foam::constPropSite::pairPotentialSite()
+{
+ return pairPotentialSite_;
+}
+
+
+inline const bool& Foam::constPropSite::electrostaticSite() const
+{
+ return electrostaticSite_;
+}
+
+
+inline bool& Foam::constPropSite::electrostaticSite()
+{
+ return electrostaticSite_;
+}
+
+
+// ************************************************************************* //
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
deleted file mode 100644
index 451ed5750c..0000000000
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
+++ /dev/null
@@ -1,606 +0,0 @@
-/*---------------------------------------------------------------------------*\
- ========= |
- \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
- \\ / O peration |
- \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
- \\/ M anipulation |
--------------------------------------------------------------------------------
-License
- This file is part of OpenFOAM.
-
- OpenFOAM is free software: you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- for more details.
-
- You should have received a copy of the GNU General Public License
- along with OpenFOAM. If not, see .
-
-\*---------------------------------------------------------------------------*/
-
-// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
-
-inline Foam::molecule::constantProperties::constantProperties()
-:
- siteReferencePositions_(Field(0)),
- siteMasses_(List(0)),
- siteCharges_(List(0)),
- siteIds_(List