mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
release on 2013-01-31_20-46-22
This commit is contained in:
82
README
82
README
@ -1,82 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
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 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.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -59,11 +59,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readPISOControls.H"
|
||||
@ -177,11 +177,11 @@ int main(int argc, char *argv[])
|
||||
<< nl << endl;
|
||||
|
||||
particleCloud.clockM().stop("Flow");
|
||||
particleCloud.clockM().stop("Global");
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
particleCloud.clockM().stop("Global");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
@ -20,18 +19,33 @@ $(forceModels)/forceModel/forceModel.C
|
||||
$(forceModels)/forceModel/newForceModel.C
|
||||
$(forceModels)/noDrag/noDrag.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
|
||||
@ -42,6 +56,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
|
||||
@ -60,21 +75,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
|
||||
|
||||
@ -98,9 +98,18 @@ alias cfdemSysTest='bash $CFDEM_SRC_DIR/etc/cfdemSystemTest.sh'
|
||||
#- shortcut to compile LIGGGHTS
|
||||
alias cfdemCompLIG='bash $CFDEM_SRC_DIR/etc/compileLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling
|
||||
#- shortcut to compile CFDEMcoupling (src+solvers)
|
||||
alias cfdemCompCFDEM='bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling src
|
||||
alias cfdemCompCFDEMsrc='bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_src.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling solvers
|
||||
alias cfdemCompCFDEMsol='bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_sol.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling utilities
|
||||
alias cfdemCompCFDEMuti='bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_uti.sh'
|
||||
|
||||
#- shortcut to compile couple library
|
||||
alias cfdemCompM2M='bash $CFDEM_SRC_DIR/etc/compileM2Mlib.sh'
|
||||
|
||||
|
||||
@ -19,32 +19,14 @@ mkdir $logDir
|
||||
#================================================================================#
|
||||
# compile src
|
||||
#================================================================================#
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling_src" #alternative: logfileName="log_compileLIGGGHTS_$NOW"
|
||||
casePath="$CFDEM_SRC_DIR"
|
||||
headerText="$logfileName""-$NOW"
|
||||
#doClean="$1" # "" | "noClean"
|
||||
#--------------------------------------------------------------------------------#
|
||||
compileLib $logpath $logfileName $casePath $headerText #$doClean
|
||||
bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_src.sh
|
||||
|
||||
#================================================================================#
|
||||
# compile solvers
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_sol.sh
|
||||
|
||||
|
||||
for solverName in "cfdemSolverPiso" "cfdemSolverIB" "cfdemSolverPisoScalar"
|
||||
do
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logfileName="log_compileCFDEMcoupling""_$solverName"
|
||||
casePath="$CFDEM_SOLVER_DIR/$solverName"
|
||||
headerText="$logfileName""_$solverName""-$NOW"
|
||||
#--------------------------------------------------------------------------------#
|
||||
compileSolver $logpath $logfileName $casePath $headerText #$doClean
|
||||
done
|
||||
|
||||
echo "Note: the list of solvers compiled might be incomplete."
|
||||
echo "please check $CFDEM_SOLVER_DIR for more solvers available"
|
||||
#================================================================================#
|
||||
# compile utilities
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_uti.sh
|
||||
|
||||
36
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh
Executable file
36
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# compile routine for CFDEMcoupling solvers, part of CFDEMproject
|
||||
# Christoph Goniva - May. 2012, DCS Computing GmbH
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/etc
|
||||
mkdir $logDir
|
||||
|
||||
#================================================================================#
|
||||
# compile solvers
|
||||
#================================================================================#
|
||||
|
||||
|
||||
for solverName in "cfdemSolverPiso" "cfdemSolverIB" "cfdemSolverPisoScalar"
|
||||
do
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling""_$solverName"
|
||||
casePath="$CFDEM_SOLVER_DIR/$solverName"
|
||||
headerText="$logfileName""_$solverName""-$NOW"
|
||||
#--------------------------------------------------------------------------------#
|
||||
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"
|
||||
30
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh
Executable file
30
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# compile routine for CFDEMcoupling source, part of CFDEMproject
|
||||
# Christoph Goniva - May. 2012, DCS Computing GmbH
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/etc
|
||||
mkdir $logDir
|
||||
|
||||
|
||||
#================================================================================#
|
||||
# compile src
|
||||
#================================================================================#
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling_src" #alternative: logfileName="log_compileLIGGGHTS_$NOW"
|
||||
casePath="$CFDEM_SRC_DIR"
|
||||
headerText="$logfileName""-$NOW"
|
||||
#--------------------------------------------------------------------------------#
|
||||
compileLib $logpath $logfileName $casePath $headerText
|
||||
36
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh
Normal file
36
src/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# compile routine for CFDEMcoupling solvers, part of CFDEMproject
|
||||
# Christoph Goniva - May. 2012, DCS Computing GmbH
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/etc
|
||||
mkdir $logDir
|
||||
|
||||
#================================================================================#
|
||||
# compile utilities
|
||||
#================================================================================#
|
||||
|
||||
|
||||
for utName in "cfdemPostproc"
|
||||
do
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling""_$utName"
|
||||
casePath="$CFDEM_UT_DIR/$utName"
|
||||
headerText="$logfileName""_$utName""-$NOW"
|
||||
#--------------------------------------------------------------------------------#
|
||||
compileSolver $logpath $logfileName $casePath $headerText
|
||||
done
|
||||
|
||||
echo "Note: the list of utilities compiled might be incomplete."
|
||||
echo "please check $CFDEM_UT_DIR for more utilities available"
|
||||
@ -98,9 +98,18 @@ alias cfdemSysTest 'bash $CFDEM_SRC_DIR/etc/cfdemSystemTest.sh'
|
||||
#- shortcut to compile LIGGGHTS
|
||||
alias cfdemCompLIG 'bash $CFDEM_SRC_DIR/etc/compileLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling
|
||||
#- shortcut to compile CFDEMcoupling (src+solvers)
|
||||
alias cfdemCompCFDEM 'bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling src
|
||||
alias cfdemCompCFDEMsrc 'bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_src.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling solvers
|
||||
alias cfdemCompCFDEMsol 'bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_sol.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling utilities
|
||||
alias cfdemCompCFDEMuti 'bash $CFDEM_SRC_DIR/etc/compileCFDEMcoupling_uti.sh'
|
||||
|
||||
#- shortcut to compile couple library
|
||||
alias cfdemCompM2M 'bash $CFDEM_SRC_DIR/etc/compileM2Mlib.sh'
|
||||
|
||||
|
||||
@ -294,6 +294,55 @@ CFDrun()
|
||||
}
|
||||
#==================================#
|
||||
|
||||
#==================================#
|
||||
#- function to run a CFD case in parallel !!!NOT DEBUGGED!!!
|
||||
parCFDrun()
|
||||
{
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$1"
|
||||
logfileName="$2"
|
||||
casePath="$3"
|
||||
headerText="$4"
|
||||
solverName="$5"
|
||||
nrProcs="$6"
|
||||
machineFileName="$7"
|
||||
debugMode="$8"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
if [ $debugMode == "on" ]; then
|
||||
debugMode="valgrind"
|
||||
else
|
||||
debugMode=""
|
||||
fi
|
||||
|
||||
#- clean up old log file
|
||||
rm $logpath/$logfileName
|
||||
|
||||
#- change path
|
||||
cd $casePath/CFD
|
||||
|
||||
#- header
|
||||
echo 2>&1 | tee -a /$logpath/$logfileName
|
||||
echo "// $headerText //" 2>&1 | tee -a $logpath/$logfileName
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- write path
|
||||
pwd 2>&1 | tee -a $logpath/$logfileName
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- run applictaion
|
||||
if [ $machineFileName == "none" ]; then
|
||||
mpirun -np $nrProcs $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
else
|
||||
mpirun -machinefile $machineFileName -np $nrProcs $debugMode $solverName -parallel 2>&1 | tee -a $logpath/$logfileName
|
||||
fi
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
#read
|
||||
}
|
||||
#==================================#
|
||||
|
||||
#==================================#
|
||||
#- function to run a parallel CFD-DEM case
|
||||
|
||||
|
||||
@ -54,6 +54,8 @@ void Foam::clockModel::start(int pos) const
|
||||
|
||||
void Foam::clockModel::start(int pos,std::string ident) const
|
||||
{
|
||||
if(particleCloud_.mesh().time().value() > startTime_)
|
||||
{
|
||||
if (pos >= n_) // alternatively one fixed size?
|
||||
{
|
||||
n_ = 2*n_;
|
||||
@ -70,11 +72,14 @@ void Foam::clockModel::start(int pos,std::string ident) const
|
||||
curParent_ = pos;
|
||||
nOfRuns_[pos] += 1;
|
||||
deltaT_[pos]-=std::clock();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void Foam::clockModel::stop() const
|
||||
{
|
||||
if(particleCloud_.mesh().time().value() > startTime_)
|
||||
{
|
||||
deltaT_[curParent_]+=std::clock();
|
||||
curLev_ -= 1;
|
||||
if (curParent_ >= 0)
|
||||
@ -85,11 +90,14 @@ void Foam::clockModel::stop() const
|
||||
{
|
||||
curParent_ = -1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void Foam::clockModel::stop(std::string ident) const
|
||||
{
|
||||
if(particleCloud_.mesh().time().value() > startTime_)
|
||||
{
|
||||
deltaT_[curParent_] += std::clock();
|
||||
if (curParent_ > 0 && identifier_[curParent_].compare(ident)!=0)
|
||||
{
|
||||
@ -104,6 +112,7 @@ void Foam::clockModel::stop(std::string ident) const
|
||||
{
|
||||
curParent_ = -1;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -198,7 +207,7 @@ void Foam::clockModel::evalPar() const
|
||||
// MPI_REDUCE SUM NODES
|
||||
MPI_Barrier(MPI_COMM_WORLD);
|
||||
strs.str("");
|
||||
std::string msg = "Parallel Measurements in CPU-seconds of all Processors:";
|
||||
std::string msg = "Parallel Measurements in CPU-seconds of all Processors (starting after first t.s.):";
|
||||
msg.append("\n");
|
||||
msg.append("Name \t avgdeltaT \t maxdeltaT \t nOfRuns \t level \t parentNr \t parentName \n");
|
||||
double buffOut=0.;
|
||||
@ -403,6 +412,8 @@ Foam::clockModel::clockModel
|
||||
dict_(dict),
|
||||
particleCloud_(sm),
|
||||
path_("clockData"),
|
||||
startTime_(sm.mesh().time().startTime().value()+sm.mesh().time().deltaT().value()+SMALL), // delay start of measurement by deltaT
|
||||
//startTime_(0), //no delay
|
||||
n_(30),
|
||||
deltaT_(std::vector<clock_t> (n_)),
|
||||
identifier_(std::vector<std::string> (n_)),
|
||||
@ -411,7 +422,10 @@ Foam::clockModel::clockModel
|
||||
curLev_(0),
|
||||
parent_(std::vector<int> (n_)),
|
||||
curParent_(0)
|
||||
{}
|
||||
{
|
||||
|
||||
Info << "start clock measurement at t >" << startTime_ << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -63,6 +63,7 @@ protected:
|
||||
const dictionary& dict_;
|
||||
cfdemCloud& particleCloud_;
|
||||
fileName path_;
|
||||
scalar startTime_;
|
||||
|
||||
mutable int n_;
|
||||
mutable std::vector<clock_t> deltaT_;
|
||||
|
||||
Binary file not shown.
@ -749,13 +749,14 @@ void Foam::twoWayM2M::locateParticle() const
|
||||
// stage 3 - all-to-all
|
||||
particleCloud_.clockM().start(9,"locate_Stage3");
|
||||
|
||||
particleCloud_.clockM().start(10,"locate_Stage3.1");
|
||||
// check if all-to-all is necessary
|
||||
int nlocal_foam_lostAll(-1);
|
||||
if (firstRun_ || safeRun_)
|
||||
{
|
||||
particleCloud_.clockM().start(10,"locate_Stage3_1");
|
||||
MPI_Allreduce(&nlocal_foam_lost_, &nlocal_foam_lostAll, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
|
||||
|
||||
particleCloud_.clockM().stop("locate_Stage3.1");
|
||||
particleCloud_.clockM().stop("locate_Stage3_1");
|
||||
}
|
||||
|
||||
if (nlocal_foam_lostAll > 0)
|
||||
{
|
||||
|
||||
@ -121,8 +121,8 @@ void KochHillDrag::setForce
|
||||
scalar Vs(0);
|
||||
scalar volumefraction(0);
|
||||
|
||||
//interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
|
||||
//interpolationCellPoint<vector> UInterpolator_(U_);
|
||||
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
|
||||
interpolationCellPoint<vector> UInterpolator_(U_);
|
||||
|
||||
for(int index = 0;index < particleCloud_.numberOfParticles(); index++)
|
||||
{
|
||||
@ -133,7 +133,7 @@ void KochHillDrag::setForce
|
||||
|
||||
if (cellI > -1) // particle Found
|
||||
{
|
||||
/*if(interpolation_)
|
||||
if(interpolation_)
|
||||
{
|
||||
position = particleCloud_.position(index);
|
||||
voidfraction = voidfractionInterpolator_.interpolate(position,cellI);
|
||||
@ -142,7 +142,7 @@ void KochHillDrag::setForce
|
||||
// Info << " --> voidfraction: " << voidfraction << endl;
|
||||
if(voidfraction>1.00) voidfraction = 1.00;
|
||||
if(voidfraction<0.40) voidfraction = 0.40;
|
||||
}else*/
|
||||
}else
|
||||
{
|
||||
voidfraction = particleCloud_.voidfraction(index);
|
||||
Ufluid = U_[cellI];
|
||||
|
||||
@ -5,9 +5,14 @@
|
||||
# Christoph Goniva - Nov. 2011
|
||||
#===================================================================#
|
||||
|
||||
#- source CFDEM env vars
|
||||
. ~/.bashrc
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/etc/functions.sh
|
||||
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
pizzaPath="/home/cfdem/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src"
|
||||
|
||||
liggghtsSim="true"
|
||||
cfdemPostProc="true"
|
||||
@ -24,13 +29,22 @@ fi
|
||||
|
||||
if [ $liggghtsSim == "true" ]
|
||||
then
|
||||
cd $casePath/DEM
|
||||
$CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME < in.liggghts_init
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$casePath"
|
||||
headerText="run_liggghts_fillCylinder_DEM"
|
||||
logfileName="log_$headerText"
|
||||
solverName="in.liggghts_init"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- get VTK data from liggghts dump file
|
||||
#cd $casePath/DEM
|
||||
#python $pizzaPath/pizza.py -f pizzaScriptInit
|
||||
#- clean up case
|
||||
rm -r $casePath/DEM/post/*
|
||||
|
||||
#- call function to run DEM case
|
||||
DEMrun $logpath $logfileName $casePath $headerText $solverName
|
||||
|
||||
|
||||
#- generate VTK data
|
||||
cd $casePath/DEM/post
|
||||
python -i $CFDEM_LPP_DIR/lpp.py dump.liggghts_init
|
||||
|
||||
@ -38,19 +52,27 @@ fi
|
||||
|
||||
if [ $cfdemPostProc == "true" ]
|
||||
then
|
||||
cd $casePath/CFD
|
||||
cfdemPostproc
|
||||
fi
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$casePath"
|
||||
headerText="run_cfdemPostproc_fillCylinder_CFD"
|
||||
logfileName="log_$headerText"
|
||||
solverName="cfdemPostproc"
|
||||
debugMode="off" # on | off
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#echo "now you can run foamToSurface from 2.0.x to generate *.stl or *.inp files.(press enter)"
|
||||
#read
|
||||
#- clean up case
|
||||
rm -r $casePath/CFD/0.*
|
||||
|
||||
#- call function to run CFD cas
|
||||
CFDrun $logpath $logfileName $casePath $headerText $solverName $debugMode
|
||||
fi
|
||||
|
||||
if [ $postproc == "true" ]
|
||||
then
|
||||
|
||||
#- get VTK data from CFD sim
|
||||
#cd $casePath/CFD
|
||||
foamToVTK
|
||||
#foamToVTK
|
||||
|
||||
#- start paraview
|
||||
paraview
|
||||
|
||||
Reference in New Issue
Block a user