Skip to content
Snippets Groups Projects

Clean up lb.h - > get rid of InitCondition

3 files
+ 595
567
Compare changes
  • Side-by-side
  • Inline
Files
3
// _ ___ __ __________ _ __ ______________ __
// | | / (_)____/ /___ ______ _/ / ____/ /_ __(_)___/ /____ / ___/ __ / / / /
// | | / / / ___/ __/ / / / __ `/ / /_ / / / / / / __ / ___/ / /___/ /_/ / / / /
// | |/ / / / / /_/ /_/ / /_/ / / __/ / / /_/ / / /_/ (__ ) / /_) / ____/ /__/ /
// |___/_/_/ \__/\__,_/\__,_/_/_/ /_/\__,_/_/\__,_/____/ \____/_/ \_____/
//=======================================================================================
// ____ ____ __ ______ __________ __ __ __ __
// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
// \ \ | | | | | |_) | | | | | | | / \ | |
// \ \ | | | | | _ / | | | | | | / /\ \ | |
// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
// \ \ | | ________________________________________________________________
// \ \ | | | ______________________________________________________________|
// \ \| | | | __ __ __ __ ______ _______
// \ | | |_____ | | | | | | | | | _ \ / _____)
// \ | | _____| | | | | | | | | | | \ \ \_______
// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
// \ _____| |__| |________| \_______/ |__| |______/ (_______/
//
//////////////////////////////////////////////////////////////////////////
// This file is part of VirtualFluids. VirtualFluids 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.
//
// VirtualFluids 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 VirtualFluids (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
//
//! \file lb.h
//! \ingroup LBM
//! \author Martin Schoenherr
//=======================================================================================#ifndef _LB_H_
#ifndef _LB_H_
#define _LB_H_
@@ -80,89 +105,6 @@ enum class CollisionTemplate {
constexpr std::initializer_list<CollisionTemplate> all_CollisionTemplate = { CollisionTemplate::Default, CollisionTemplate::WriteMacroVars, CollisionTemplate::ApplyBodyForce, CollisionTemplate::AllFeatures, CollisionTemplate::SubDomainBorder};
constexpr std::initializer_list<CollisionTemplate> bulk_CollisionTemplate = { CollisionTemplate::Default, CollisionTemplate::WriteMacroVars, CollisionTemplate::ApplyBodyForce, CollisionTemplate::AllFeatures};
struct InitCondition
{
real Re;
real factorPressBC {1.0};
real Diffusivity {0.001};
real Temp {0.0};
real TempBC {1.0};
real RealX {1.0};
real RealY {1.0};
int numprocs {1};
int myProcessId {0};
int maxdev {1};
uint tDoCheckPoint {0};
uint tDoRestart {0};
uint tCalcMedStart {0};
uint tCalcMedEnd {10};
uint tend {10};
uint tout {1};
uint tStartOut {0};
uint PressInID {0};
uint PressOutID {0};
uint PressInZ {1};
uint PressOutZ {2};
std::vector<uint> devices {0, 1}; // one device with ID = 0
std::vector<int> GridX, GridY, GridZ, DistX, DistY, DistZ;
std::vector<real> scaleLBMtoSI, translateLBMtoSI;
std::vector<real> minCoordX, minCoordY, minCoordZ, maxCoordX, maxCoordY, maxCoordZ;
std::string fname {"output/simulation"};
std::string oPath {"output/"};
std::string gridPath {"grid/"};
std::string oPrefix {"simulation"};
std::string geometryFileC, geometryFileM, geometryFileF;
std::string kFull, geoFull, geoVec, coordX, coordY, coordZ, neighborX, neighborY, neighborZ, neighborWSB, scaleCFC, scaleCFF, scaleFCC, scaleFCF, scaleOffsetCF, scaleOffsetFC;
std::string noSlipBcPos, noSlipBcQs, noSlipBcValue;
std::string slipBcPos, slipBcQs, slipBcValue;
std::string pressBcPos, pressBcQs, pressBcValue;
std::string geomBoundaryBcQs,velBcQs;
std::string geomBoundaryBcValues,velBcValues,pressBcValues,noSlipBcValues;
std::string propellerCylinder, propellerValues, propellerQs, measurePoints;
std::string inletBcQs, inletBcValues;
std::string outletBcQs, outletBcValues;
std::string topBcQs, topBcValues;
std::string bottomBcQs, bottomBcValues;
std::string frontBcQs, frontBcValues;
std::string backBcQs, backBcValues;
std::string wallBcQs, wallBcValues;
std::string periodicBcQs, periodicBcValues;
std::string numberNodes, LBMvsSI;
std::string cpTop, cpBottom, cpBottom2;
std::string concentration, streetVelocity;
std::string geomNormalX, geomNormalY, geomNormalZ, inflowNormalX, inflowNormalY, inflowNormalZ, outflowNormalX, outflowNormalY, outflowNormalZ;
uint timeStepForMP {10};
real clockCycleForMP {1.0};
real vis {0.001};
real vis_ratio {1.0};
real u0 {0.01};
real u0_ratio {1.0};
real delta_rho {0.0};
real delta_press {1.0};
bool printFiles {false};
bool doRestart {false};
bool doCheckPoint {false};
bool readGeo {false};
bool isGeo, isProp, isCp;
bool GeometryValues {false};
bool is2ndOrderMoments {false};
bool is3rdOrderMoments {false};
bool isHighOrderMoments {false};
bool calcMedian {false};
bool isConc {false};
bool isWale {false};
TurbulenceModel turbulenceModel {TurbulenceModel::None};
bool isTurbulentViscosity {false};
real SGSConstant {0.0};
bool isMeasurePoints {false};
bool isInitNeq {false};
bool isGeoNormal, isInflowNormal, isOutflowNormal;
bool hasWallModelMonitor {false};
bool simulatePorousMedia {false};
bool streetVelocityFile {false};
real outflowPressureCorrectionFactor {0.0};
};
//Interface Cells
// example of old names (pre 2023) ICellCFC: interpolation from Coarse (C) to Fine (F), indices of the Coarse cells (C)
typedef struct ICells{
@@ -179,17 +121,17 @@ typedef struct ICellNeigh{
} InterpolationCellNeighbor;
// Distribution functions g 6
typedef struct Distri6 {
typedef struct Distri6 { // ADD IN FUTURE RELEASE
real* g[6];
} Distributions6;
// Distribution functions f 7
typedef struct Distri7{
typedef struct Distri7{ // ADD IN FUTURE RELEASE
real* f[7];
} Distributions7;
// Distribution functions f 19
typedef struct Distri19{
typedef struct Distri19{ // DEPRECATED
real* f[19];
} Distributions19;
@@ -236,14 +178,14 @@ typedef struct QforPrecursorBC{
}QforPrecursorBoundaryConditions;
//BCTemp
typedef struct TempforBC{
typedef struct TempforBC{ // ADD IN FUTURE RELEASE
int* k;
real* temp;
int kTemp=0;
}TempforBoundaryConditions;
//BCTempVel
typedef struct TempVelforBC{
typedef struct TempVelforBC{ // ADD IN FUTURE RELEASE
int* k;
real* temp;
real* tempPulse;
@@ -252,7 +194,7 @@ typedef struct TempVelforBC{
}TempVelforBoundaryConditions;
//BCTempPress
typedef struct TempPressforBC{
typedef struct TempPressforBC{ // ADD IN FUTURE RELEASE
int* k;
real* temp;
real* velo;
@@ -272,7 +214,7 @@ typedef struct WMparas{
//measurePoints
typedef struct MeasP{
typedef struct MeasP{ // ADD IN FUTURE RELEASE
std::string name;
uint k;
std::vector<real> Vx;
@@ -296,7 +238,7 @@ typedef struct PN27{
int numberOfFs;
}ProcessNeighbor27;
typedef struct PN_F3 {
typedef struct PN_F3 { // ADD IN FUTURE RELEASE
real* g[6];
uint memsizeGs;
int* index;
@@ -306,7 +248,7 @@ typedef struct PN_F3 {
int numberOfGs;
}ProcessNeighborF3;
//path line particles
//path line particles // DEPRECATED
typedef struct PLP{
bool *stuck, *hot;
real *coordXabsolut, *coordYabsolut, *coordZabsolut;
@@ -321,6 +263,7 @@ typedef struct PLP{
}PathLineParticles;
//////////////////////////////////////////////////////////////////////////
// DEPRECATED
inline int vectorPosition(int i, int j, int k, int Lx, int Ly )
{
//return((j+15)*(Lx+2*16)+(i+15));
Loading