diff --git a/src/.gitignore b/src/.gitignore index 44599544..ce60e8c7 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -5,3 +5,5 @@ log_* log.* *~ + +lnInclude diff --git a/src/recurrence/Make/files b/src/recurrence/Make/files index cd69ddc6..cacbc10d 100644 --- a/src/recurrence/Make/files +++ b/src/recurrence/Make/files @@ -2,6 +2,7 @@ recBase/recBase.C recModel/recModel/recModel.C recModel/recModel/newRecModel.C recModel/standardRecModel/standardRecModel.C +recModel/gerhardsRecModel/gerhardsRecModel.C recNorm/recNorm/recNorm.C recNorm/recNorm/newRecNorm.C recNorm/sqrDiffNorm/sqrDiffNorm.C diff --git a/src/recurrence/recModel/gerhardsRecModel/gerhardsRecModel.C b/src/recurrence/recModel/gerhardsRecModel/gerhardsRecModel.C new file mode 100644 index 00000000..cb6b8889 --- /dev/null +++ b/src/recurrence/recModel/gerhardsRecModel/gerhardsRecModel.C @@ -0,0 +1,1026 @@ +/*---------------------------------------------------------------------------*\ + CFDEMcoupling academic - Open Source CFD-DEM coupling + + Contributing authors: + Thomas Lichtenegger, Gerhard Holzinger + Copyright (C) 2015- Johannes Kepler University, Linz +------------------------------------------------------------------------------- +License + This file is part of CFDEMcoupling academic. + + CFDEMcoupling academic 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 academic 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 academic. If not, see . +\*---------------------------------------------------------------------------*/ + +#include "error.H" +#include "Random.H" +#include "gerhardsRecModel.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(gerhardsRecModel, 0); + +addToRunTimeSelectionTable +( + recModel, + gerhardsRecModel, + dictionary +); + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +// Construct from components +gerhardsRecModel::gerhardsRecModel +( + const dictionary& dict, + recBase& base +) +: + recModel(dict,base), + propsDict_(dict.subDict(typeName + "Props")), + dataBaseName_(propsDict_.lookupOrDefault("dataBase", word("dataBase"))), + recTime(fileName(dataBaseName_), "", "../system", "../constant", false), + timeDirs(recTime.times()), + skipZero_(propsDict_.lookupOrDefault("skipZero", Switch(false))), + checkSkipZero_(checkSkipZero()), + numRecFields_(skipZero_ ? label(timeDirs.size())-1 : label(timeDirs.size())), + verboseVerbose_(propsDict_.lookupOrDefault("verboseVerbose", Switch(false))), + verboseVacate_(propsDict_.lookupOrDefault("verboseVacate", Switch(false))), + recurrenceMatrix_(numRecFields_, scalar(-1.0)), + timeIndexList_(numRecFields_-1), + revTimeIndexList_(numRecFields_-1), + timeValueList_(numRecFields_-1), + contTimeIndex(0), + lowerSeqLim_(max(1, label(numRecFields_/20))), + upperSeqLim_(label(numRecFields_/5)), + numDataBaseFields_(propsDict_.lookupOrDefault