diff --git a/README b/README new file mode 100644 index 00000000..fd2ca756 --- /dev/null +++ b/README @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + CFDEMcoupling - Open Source CFD-DEM coupling + + CFDEMcoupling is part of the CFDEMproject + www.cfdem.com + Christoph Goniva, christoph.goniva@cfdem.com + Copyright 2009-2012 JKU Linz + Copyright 2012- DCS Computing GmbH, Linz +------------------------------------------------------------------------------- +License + This file is part of CFDEMcoupling. + + CFDEMcoupling 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. + + CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Description + This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS + and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER). +\*---------------------------------------------------------------------------*/ + + +CFDEM coupling provides an open source parallel coupled CFD-DEM framework +combining the strengths of LIGGGHTS DEM code and the Open Source +CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand +standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM +code LIGGGHTS. In this toolbox the particle representation within the +CFD solver is organized by "cloud" classes. Key functionalities are organised +in sub-models (e.g. force models, data exchange models, etc.) which can easily +be selected and combined by dictionary settings. + +The coupled solvers run fully parallel on distributed-memory clusters. + +Features are: + +- its modular approach allows users to easily implement new models +- its MPI parallelization enables to use it for large scale problems +- the "forum"_lws on CFD-DEM gives the possibility to exchange with other + users / developers +- the use of GIT allows to easily update to the latest version +- basic documentation is provided + +The file structure: + +- "src" directory including the source files of the coupling toolbox and models +- "applications" directory including the solver files for coupled CFD-DEM simulations +- "doc" directory including the documentation of CFDEMcoupling +- "tutorials" directory including basic tutorial cases showing the functionality + + + +Details on installation are given on the "www.cfdem.com" + +The functionality of this CFD-DEM framwork is described via "tutorial cases" showing +how to use different solvers and models. + +CFDEMcoupling stands for Computational Fluid Dynamics (CFD) - +Discrete Element Method (DEM) coupling. + +CFDEMcoupling is an open-source code, distributed freely under the terms of the +GNU Public License (GPL). + +Core development of CFDEMcoupling is done by +Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012 + + +\*---------------------------------------------------------------------------*/ +(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group. +This offering is not affiliated, approved or endorsed by ESI Group, +the producer of the OpenFOAMĀ® software and owner of the OpenFOAMĀ® trade mark. +\*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/cfdemPostproc/cfdemPostproc.C b/applications/utilities/cfdemPostproc/cfdemPostproc.C index 93fe66ab..8db48d87 100644 --- a/applications/utilities/cfdemPostproc/cfdemPostproc.C +++ b/applications/utilities/cfdemPostproc/cfdemPostproc.C @@ -42,6 +42,7 @@ Description #include "averagingModel.H" #include "momCoupleModel.H" #include "forceModel.H" +#include "IOModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -120,6 +121,8 @@ int main(int argc, char *argv[]) runTime.write(); + particleCloud.IOM().dumpDEMdata(); + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; diff --git a/doc/CFDEMcoupling_Manual.html b/doc/CFDEMcoupling_Manual.html index c1dc7c47..01f9c6bb 100644 --- a/doc/CFDEMcoupling_Manual.html +++ b/doc/CFDEMcoupling_Manual.html @@ -75,7 +75,7 @@ The functionality of this CFD-DEM framwork is described via tu


-

(*) OpenFOAM(R) is a registered trade mark of Silicon Graphics International Corp. This offering is not affiliated, approved or endorsed by Silicon Graphics International Corp., the producer of the OpenFOAM(R) software and owner of the OpenFOAM(R) trademark. +

(*) OpenFOAM(R) is a registered trade mark of the ESI Group. This offering is not affiliated, approved or endorsed by ESI Group, the producer of the OpenFOAM(R) software and owner of the OpenFOAM(R) trade mark.


@@ -204,34 +204,34 @@ listing below of styles within certain commands.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + +
IOModelIOModel_basicIO
IOModel_noIOIOModel_trackIO
averagingModelaveragingModel_dilute
cfdemSolverIBcfdemSolverPiso
cfdemSolverPisoScalarclockModel
clockModel_noClockclockModel_standardClock
dataExchangeModeldataExchangeModel_noDataExchange
dataExchangeModel_oneWayVTKdataExchangeModel_twoWayFiles
dataExchangeModel_twoWayM2MdataExchangeModel_twoWayMPI
forceModelforceModel_Archimedes
forceModel_ArchimedesIBforceModel_DiFeliceDrag
forceModel_GidaspowDragforceModel_KochHillDrag
forceModel_LaEuScalarTempforceModel_MeiLift
forceModel_SchillerNaumannDragforceModel_ShirgaonkarIB
forceModel_gradPForceforceModel_noDrag
forceModel_virtualMassForceforceModel_viscForce
liggghtsCommandModelliggghtsCommandModel_execute
liggghtsCommandModel_readLiggghtsDataliggghtsCommandModel_runLiggghts
liggghtsCommandModel_writeLiggghtslocateModel
locateModel_engineSearchlocateModel_engineSearchIB
locateModel_standardSearchlocateModel_turboEngineM2MSearch
locateModel_turboEngineSearchmeshMotionModel
meshMotionModel_noMeshMotionmomCoupleModel
momCoupleModel_explicitCouplemomCoupleModel_implicitCouple
momCoupleModel_noCoupleregionModel
regionModel_allRegionvoidfractionModel
voidfractionModel_GaussVoidFractionvoidfractionModel_IBVoidFraction
voidfractionModel_bigParticleVoidFractionvoidfractionModel_centreVoidFraction
voidfractionModel_dividedVoidFraction +
IOModel_noIOIOModel_sophIO
IOModel_trackIOaveragingModel
averagingModel_dilutecfdemSolverIB
cfdemSolverPisocfdemSolverPisoScalar
clockModelclockModel_noClock
clockModel_standardClockdataExchangeModel
dataExchangeModel_noDataExchangedataExchangeModel_oneWayVTK
dataExchangeModel_twoWayFilesdataExchangeModel_twoWayM2M
dataExchangeModel_twoWayMPIforceModel
forceModel_ArchimedesforceModel_ArchimedesIB
forceModel_DiFeliceDragforceModel_GidaspowDrag
forceModel_KochHillDragforceModel_LaEuScalarTemp
forceModel_MeiLiftforceModel_SchillerNaumannDrag
forceModel_ShirgaonkarIBforceModel_gradPForce
forceModel_noDragforceModel_virtualMassForce
forceModel_viscForceliggghtsCommandModel
liggghtsCommandModel_executeliggghtsCommandModel_readLiggghtsData
liggghtsCommandModel_runLiggghtsliggghtsCommandModel_writeLiggghts
locateModellocateModel_engineSearch
locateModel_engineSearchIBlocateModel_standardSearch
locateModel_turboEngineM2MSearchlocateModel_turboEngineSearch
meshMotionModelmeshMotionModel_noMeshMotion
momCoupleModelmomCoupleModel_explicitCouple
momCoupleModel_implicitCouplemomCoupleModel_noCouple
regionModelregionModel_allRegion
voidfractionModelvoidfractionModel_GaussVoidFraction
voidfractionModel_IBVoidFractionvoidfractionModel_bigParticleVoidFraction
voidfractionModel_centreVoidFractionvoidfractionModel_dividedVoidFraction
diff --git a/doc/CFDEMcoupling_Manual.pdf b/doc/CFDEMcoupling_Manual.pdf index fddf9f81..60d614d4 100644 Binary files a/doc/CFDEMcoupling_Manual.pdf and b/doc/CFDEMcoupling_Manual.pdf differ diff --git a/doc/CFDEMcoupling_Manual.txt b/doc/CFDEMcoupling_Manual.txt index 6c8df26f..1b3d7d66 100644 --- a/doc/CFDEMcoupling_Manual.txt +++ b/doc/CFDEMcoupling_Manual.txt @@ -56,7 +56,7 @@ Core development of CFDEMcoupling is done by Christoph Goniva and Christoph Klos This documentation was written by Christoph Goniva, DCS Computing GmbH, 2012 :line -(*) "OpenFOAM(R)"_of is a registered trade mark of Silicon Graphics International Corp. This offering is not affiliated, approved or endorsed by Silicon Graphics International Corp., the producer of the OpenFOAM(R) software and owner of the OpenFOAM(R) trademark. +(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group. This offering is not affiliated, approved or endorsed by ESI Group, the producer of the OpenFOAM(R) software and owner of the OpenFOAM(R) trade mark. :line @@ -170,274 +170,6 @@ Reasonable example settings for the "liggghtsCommands" dictionary are given in t - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1.6 Models/Solvers :h4,link(cmd_5),link(comm) This section lists all CFDEMcoupling sub-models and solvers alphabetically, with a separate @@ -447,6 +179,7 @@ listing below of styles within certain commands. "IOModel"_IOModel.html, "IOModel_basicIO"_IOModel_basicIO.html, "IOModel_noIO"_IOModel_noIO.html, +"IOModel_sophIO"_IOModel_sophIO.html, "IOModel_trackIO"_IOModel_trackIO.html, "averagingModel"_averagingModel.html, "averagingModel_dilute"_averagingModel_dilute.html, diff --git a/doc/IOModel_basicIO.html b/doc/IOModel_basicIO.html index fddb3d08..3d8ff298 100644 --- a/doc/IOModel_basicIO.html +++ b/doc/IOModel_basicIO.html @@ -21,7 +21,7 @@

Description:

-

The basic IO-model writes particle positions velocities and radii to files. The output directory ($casePath/CFD/particles) is created automatically. Data is written every write time of the CFD simulation. +

The basic IO-model writes particle positions velocities and radii to files. The default output directory ($casePath/CFD/proc*/time/lagrangian). Using the ceyword "serialOutput;" in couplingProperties the IO is serial to the directory ($casePath/CFD/lagrangian). In the latter case only the data on processor 0 is written! Data is written every write time of the CFD simulation.

Restrictions: None.

diff --git a/doc/IOModel_basicIO.txt b/doc/IOModel_basicIO.txt index 9108e8e0..d73c5168 100644 --- a/doc/IOModel_basicIO.txt +++ b/doc/IOModel_basicIO.txt @@ -19,7 +19,7 @@ IOModel "basicIO"; :pre [Description:] -The basic IO-model writes particle positions velocities and radii to files. The output directory ($casePath/CFD/particles) is created automatically. Data is written every write time of the CFD simulation. +The basic IO-model writes particle positions velocities and radii to files. The default output directory ($casePath/CFD/proc*/time/lagrangian). Using the ceyword "serialOutput;" in couplingProperties the IO is serial to the directory ($casePath/CFD/lagrangian). In the latter case only the data on processor 0 is written! Data is written every write time of the CFD simulation. [Restrictions:] None. diff --git a/doc/IOModel_sophIO.html b/doc/IOModel_sophIO.html new file mode 100644 index 00000000..21a784df --- /dev/null +++ b/doc/IOModel_sophIO.html @@ -0,0 +1,33 @@ + +
CFDEMproject WWW Site - CFDEM Commands +
+ + + + +
+ +

IOModel_sophIO command +

+

Syntax: +

+

Defined in couplingProperties dictionary. +

+
IOModel "sophIO"; 
+
+

Examples: +

+
IOModel "sophIO"; 
+
+

Description: +

+

The soph IO-model writes particle positions, velocities, voidfraction, implicit forces, explicit forces , DEM forces and radii to files. the same as for basicIO model. Data is written every write time of the CFD simulation. +Currently paraview can only interpret position, velocity and radius (a port to VTK might help). +

+

Restrictions: None. +

+

Related commands: +

+

IOModel +

+ diff --git a/doc/IOModel_sophIO.txt b/doc/IOModel_sophIO.txt new file mode 100644 index 00000000..3a1a19c0 --- /dev/null +++ b/doc/IOModel_sophIO.txt @@ -0,0 +1,30 @@ +"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c + +:link(lws,http://www.cfdem.com) +:link(lc,CFDEMcoupling_Manual.html#comm) + +:line + +IOModel_sophIO command :h3 + +[Syntax:] + +Defined in couplingProperties dictionary. + +IOModel "sophIO"; :pre + +[Examples:] + +IOModel "sophIO"; :pre + +[Description:] + +The soph IO-model writes particle positions, velocities, voidfraction, implicit forces, explicit forces , DEM forces and radii to files. the same as for basicIO model. Data is written every write time of the CFD simulation. +Currently paraview can only interpret position, velocity and radius (a port to VTK might help). + +[Restrictions:] None. + +[Related commands:] + +"IOModel"_IOModel.html + diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf index d26c5b99..7bd936a3 100644 Binary files a/doc/githubAccess_public.pdf and b/doc/githubAccess_public.pdf differ diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files index c2b9ddeb..5434353f 100644 --- a/src/lagrangian/cfdemParticle/Make/files +++ b/src/lagrangian/cfdemParticle/Make/files @@ -6,7 +6,6 @@ voidFractionModels = subModels/voidFractionModel locateModels = subModels/locateModel meshMotionModels = subModels/meshMotionModel momCoupleModels = subModels/momCoupleModel -regionModels = subModels/regionModel dataExchangeModels = subModels/dataExchangeModel averagingModels = subModels/averagingModel clockModels = subModels/clockModel @@ -21,18 +20,33 @@ $(forceModels)/forceModel/newForceModel.C $(forceModels)/noDrag/noDrag.C $(forceModels)/checkCouplingInterval/checkCouplingInterval.C $(forceModels)/DiFeliceDrag/DiFeliceDrag.C +$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C $(forceModels)/GidaspowDrag/GidaspowDrag.C $(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C $(forceModels)/Archimedes/Archimedes.C $(forceModels)/ArchimedesIB/ArchimedesIB.C $(forceModels)/interface/interface.C $(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C +$(forceModels)/fieldTimeAverage/fieldTimeAverage.C +$(forceModels)/fieldBound/fieldBound.C +$(forceModels)/volWeightedAverage/volWeightedAverage.C +$(forceModels)/totalMomentumExchange/totalMomentumExchange.C $(forceModels)/KochHillDrag/KochHillDrag.C +$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C +$(forceModels)/BeetstraDrag/BeetstraDrag.C +$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C $(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C +$(forceModels)/LaEuScalarDust/LaEuScalarDust.C $(forceModels)/virtualMassForce/virtualMassForce.C $(forceModels)/gradPForce/gradPForce.C +$(forceModels)/gradULiftForce/gradULiftForce.C $(forceModels)/viscForce/viscForce.C $(forceModels)/MeiLift/MeiLift.C +$(forceModels)/KochHillDragNLift/KochHillDragNLift.C +$(forceModels)/solidsPressureForce/solidsPressureForce.C +$(forceModels)/periodicPressure/periodicPressure.C +$(forceModels)/periodicPressureControl/periodicPressureControl.C +$(forceModels)/averageSlipVel/averageSlipVel.C $(forceModelsMS)/forceModelMS/forceModelMS.C $(forceModelsMS)/forceModelMS/newForceModelMS.C @@ -43,6 +57,7 @@ $(IOModels)/IOModel/newIOModel.C $(IOModels)/noIO/noIO.C $(IOModels)/basicIO/basicIO.C $(IOModels)/trackIO/trackIO.C +$(IOModels)/sophIO/sophIO.C $(voidFractionModels)/voidFractionModel/voidFractionModel.C $(voidFractionModels)/voidFractionModel/newVoidFractionModel.C @@ -61,21 +76,18 @@ $(locateModels)/turboEngineSearch/turboEngineSearch.C $(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C $(locateModels)/engineSearchIB/engineSearchIB.C - $(meshMotionModels)/meshMotionModel/meshMotionModel.C $(meshMotionModels)/meshMotionModel/newMeshMotionModel.C $(meshMotionModels)/noMeshMotion/noMeshMotion.C +$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C $(momCoupleModels)/momCoupleModel/momCoupleModel.C $(momCoupleModels)/momCoupleModel/newMomCoupleModel.C $(momCoupleModels)/explicitCouple/explicitCouple.C +$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C $(momCoupleModels)/implicitCouple/implicitCouple.C $(momCoupleModels)/noCouple/noCouple.C -$(regionModels)/regionModel/regionModel.C -$(regionModels)/regionModel/newRegionModel.C -$(regionModels)/allRegion/allRegion.C - $(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C $(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C $(dataExchangeModels)/oneWayVTK/oneWayVTK.C @@ -101,4 +113,4 @@ $(liggghtsCommandModels)/runLiggghts/runLiggghts.C $(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C $(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C -LIB = $(FOAM_USER_LIBBIN)/lib$(CFDEM_LIB_NAME) +LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME) diff --git a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H index 2a401f79..a2dd8dd9 100755 --- a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H +++ b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H @@ -1,5 +1,5 @@ -word CFDEMversion="cfdem-2.5.0"; -word compatibleLIGGGHTSversion="2.2.5"; +word CFDEMversion="cfdem-2.5.1"; +word compatibleLIGGGHTSversion="2.2.4"; Info << "\nCFDEMcoupling version: " << CFDEMversion << "\n" << endl; Info << "\n, compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << "\n" << endl; diff --git a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh b/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh index 5efc31a6..8a858466 100755 --- a/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh +++ b/src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh @@ -32,5 +32,5 @@ do compileSolver $logpath $logfileName $casePath $headerText done -echo "Note: the list of solvers compiled might be incomplete." -echo "please check $CFDEM_SOLVER_DIR for more solvers available" +#echo "Note: the list of solvers compiled might be incomplete." +#echo "please check $CFDEM_SOLVER_DIR for more solvers available" diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C index ead3bd54..35b5f68a 100644 --- a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C +++ b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C @@ -64,11 +64,18 @@ basicIO::basicIO //propsDict_(dict.subDict(typeName + "Props")), dirName_("lagrangian"), path_("dev/null"), - m2mComm_(false), + parOutput_(true), + nPProc_(-1), lagPath_("dev/null") { - if (particleCloud_.dataExchangeM().myType()=="twoWayM2M"){m2mComm_=true;} //typeName did not work - Info << "particleCloud_.dataExchangeM().typeName=" << particleCloud_.dataExchangeM().myType() << endl; + if ( + particleCloud_.dataExchangeM().myType()=="oneWayVTK" || + dict_.found("serialOutput") + ) + { + parOutput_=false; + Warning << "IO model is in serial write mode, only data on proc 0 is written" << endl; + } //if (propsDict_.found("dirName")) dirName_=word(propsDict_.lookup("dirName")); path_ = buildFilePath(dirName_); @@ -90,17 +97,24 @@ void basicIO::dumpDEMdata() const if (time_.outputTime()) { // make time directory - if (m2mComm_) lagPath_=buildFilePath(dirName_); + if (parOutput_) lagPath_=buildFilePath(dirName_); else { + Info << "createTimeDir(path_), path="< -1) count++; + nPProc_=count; // stream data to file - streamDataToPath(lagPath_, particleCloud_.positions(), particleCloud_.numberOfParticles(), "positions","vector","Cloud","0"); - streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "v","vector","vectorField",""); - streamDataToPath(lagPath_, particleCloud_.radii(), particleCloud_.numberOfParticles(), "r","scalar","scalarField",""); + streamDataToPath(lagPath_, particleCloud_.positions(), "positions","vector","Cloud","0"); + streamDataToPath(lagPath_, particleCloud_.velocities(), "v","vector","vectorField",""); + streamDataToPath(lagPath_, particleCloud_.radii(), "r","scalar","scalarField",""); } } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -110,7 +124,7 @@ fileName basicIO::buildFilePath(word dirName) const { // create file structure fileName path(""); - if(m2mComm_) + if(parOutput_) { path=fileName(particleCloud_.mesh().time().path()/particleCloud_.mesh().time().timeName()/dirName/"particleCloud"); mkDir(path,0777); @@ -125,22 +139,25 @@ fileName basicIO::buildFilePath(word dirName) const return path; } -void basicIO::streamDataToPath(fileName path, double** array,int n,word name,word type,word className,word finaliser) const +void basicIO::streamDataToPath(fileName path, double** array,word name,word type,word className,word finaliser) const { vector vec; OFstream* fileStream = new OFstream(fileName(path/name)); *fileStream << "FoamFile\n"; *fileStream << "{version 2.0; format ascii;class "<< className << "; location 0;object "<< name <<";}\n"; - *fileStream << n <<"\n"; + *fileStream << nPProc_ <<"\n"; *fileStream << "(\n"; - for(int index = 0;index < n; ++index) + for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) { - if (type=="scalar"){ - *fileStream << array[index][0] << " \n"; - }else { - for(int i=0;i<3;i++) vec[i] = array[index][i]; - *fileStream <<"( "<< vec[0] <<" "< -1) // particle Found + { + if (type=="scalar"){ + *fileStream << array[index][0] << " \n"; + }else { + for(int i=0;i<3;i++) vec[i] = array[index][i]; + *fileStream <<"( "<< vec[0] <<" "<