5#ifndef _COUETTECONFIG_H_
6#define _COUETTECONFIG_H_
8#include "tarch/configuration/ParseConfiguration.h"
9#include "tarch/la/Vector.h"
14namespace configurations {
58 std::cout <<
"Could not read input file " << filename
59 <<
": missing element "
66 if (n_mamico == NULL) {
67 std::cout <<
"Could not read input file " << filename <<
": missing element <mamico>" << std::endl;
72 std::cout <<
"Could not read input file " << filename
73 <<
": missing element "
74 "<molecular-dynamics>"
80 std::cout <<
"Could not read input file " << filename
81 <<
": missing element "
87 if (n_unexpected != NULL) {
88 std::cout <<
"Could not read input file " << filename <<
": unknown element " << n_unexpected->
Name() << std::endl;
94 std::cout <<
"Could not read input file " << filename <<
": Missing subtag: domain" << std::endl;
107 if (subtag == NULL) {
108 std::cout <<
"Could not read input file couette.xml: Missing subtag: coupling" << std::endl;
120 if (subtag == NULL) {
121 std::cout <<
"Could not read input file " << filename
122 <<
": Missing subtag: "
136 if (num_MD ==
"dynamic") {
145 std::cout <<
"Could not read input file " << filename
147 "number-md-simulations < 1"
152 }
else if (type ==
"synthetic") {
157 }
else if (type ==
"ls1") {
165 std::cout <<
"Could not read input file " << filename
166 <<
": Unknown microscopic "
174 if (subtag == NULL) {
175 std::cout <<
"Could not read input file " << filename
176 <<
": Missing subtag: "
187 }
else if (type ==
"fd") {
192#if (BUILD_WITH_OPENFOAM)
193 else if (type ==
"foam") {
201 else if (type ==
"analytical") {
204 std::cout <<
"analytic solver only supports flow in x-direction" << std::endl;
208 std::cout <<
"Could not read input file " << filename
209 <<
": Unknown macroscopic "
232 std::cout <<
"Invalid configuration: Synthetic MD runs sequentially on "
234 <<
"It does neither support parallel communication nor "
235 "multi-instance sampling"
242 std::cout <<
"Invalid configuration: COUETTE_ANALYTICAL does not "
243 "support twoWayCoupling"
252#if (BUILD_WITH_OPENFOAM)
258 std::string directory;
341#if (BUILD_WITH_OPENFOAM)
Definition ParseConfiguration.h:26
static XMLConfiguration load(const std::string filename)
Definition ParseConfiguration.h:45
tinyxml2::XMLNode *const root
Definition ParseConfiguration.h:34
Definition ParseConfiguration.h:20
static void readBoolMandatory(bool &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:151
static void readStringMandatory(std::string &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:201
static void readVectorMandatory(tarch::la::Vector< size, T > &result, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:264
static void readIntOptional(int &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:132
static void readIntMandatory(int &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:115
static void readDoubleOptional(double &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:96
static void readDoubleMandatory(double &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:79
Definition tinyxml2.h:1268
const char * Name() const
Get the name of an element (which is the Value() of the node.)
Definition tinyxml2.h:1272
const XMLElement * NextSiblingElement(const char *name=0) const
Get the next (right) sibling element of this node, with an optionally supplied name.
const XMLElement * FirstChildElement(const char *name=0) const
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15
Configuration parameters for Couette flow scenario.
Definition CouetteConfiguration.h:25
double absVelErrEnd
only for dynamic MD: target absolute velocity error at end of all coupling cycles
Definition CouetteConfiguration.h:328
double density
the general density of the fluid under consideration
Definition CouetteConfiguration.h:305
bool twoWayCoupling
true if from the md solver will be applied as boundary condition for the continuum solver
Definition CouetteConfiguration.h:295
double channelheight
channel is always expected to have origin at (0.0,0.0,0.0) and to be cubic (MD 30: 50....
Definition CouetteConfiguration.h:271
double absVelErrStart
only for dynamic MD: target absolute velocity error at start of all coupling cycles
Definition CouetteConfiguration.h:326
int twsLoopMin
Definition CouetteConfiguration.h:335
int equSteps
number of equilibartion time steps = number of time steps that the md will run before the coupling is...
Definition CouetteConfiguration.h:319
int initAdvanceCycles
number of cycles the continuum solver is advanced before the coupling is enabled
Definition CouetteConfiguration.h:314
double temp
the start temperature for the fluid under consideration
Definition CouetteConfiguration.h:316
bool md2Macro
true if data will be send & received from the md to the continuum solver
Definition CouetteConfiguration.h:287
tarch::la::Vector< 3, double > wallInitVelocity
the velocity at the moving wall (z=0) while the wallInitCycles
Definition CouetteConfiguration.h:278
int lowerBoundNumberMDSimulations
the minimum number of md simulation instances in dynamic MD coupling
Definition CouetteConfiguration.h:324
bool computeSNR
true if the signal to noise ratio shall be evaluated
Definition CouetteConfiguration.h:292
tarch::la::Vector< 3, double > wallVelocity
velocity of moving wall (lower boundary moves)
Definition CouetteConfiguration.h:273
bool twsLoop
Definition CouetteConfiguration.h:333
double kinVisc
the kinematic viscosity of the fluid under consideration
Definition CouetteConfiguration.h:307
MacroSolverType
Definition CouetteConfiguration.h:32
@ COUETTE_ANALYTICAL
Definition CouetteConfiguration.h:33
@ COUETTE_LB
Definition CouetteConfiguration.h:35
@ COUETTE_FD
Definition CouetteConfiguration.h:37
@ COUETTE_FOAM
the IcoFoam solver is used (coupling::solvers::IcoFoam)
Definition CouetteConfiguration.h:39
int twsLoopMax
Definition CouetteConfiguration.h:337
double wallOscillations
total number of oscillation periods of the oscillating wall velocity
Definition CouetteConfiguration.h:281
MacroSolverType maSolverType
the type of continuum solver
Definition CouetteConfiguration.h:301
tarch::la::Vector< 3, unsigned int > lbNumberProcesses
only for LB couette solver: number of processes
Definition CouetteConfiguration.h:309
bool macro2Md
true if data will be send & received from the continuum to the md solver
Definition CouetteConfiguration.h:290
int csvEveryTimestep
the time step interval for writing the md data to csv files
Definition CouetteConfiguration.h:299
double noiseSigma
the sigma for the random noise in the case of synthetic md solver
Definition CouetteConfiguration.h:331
int totalNumberMDSimulations
the number of md simulation instances in a multi-instance coupling, -1 = dynamic
Definition CouetteConfiguration.h:322
static CouetteConfig parseCouetteConfiguration(const std::string &filename)
creates CouetteConfig if all elements exist and can be read
Definition CouetteConfiguration.h:51
int twsLoopStep
Definition CouetteConfiguration.h:339
int filterInitCycles
number of coupling cycles before a filter is applied
Definition CouetteConfiguration.h:297
MicroSolverType
Definition CouetteConfiguration.h:42
@ SIMPLEMD
the SimpleMD solver is used
Definition CouetteConfiguration.h:43
@ SYNTHETIC
the synthetic solver is used
Definition CouetteConfiguration.h:44
@ LS1
the LS1 solver is used
Definition CouetteConfiguration.h:45
int plotEveryTimestep
only for LB couette solver: VTK plotting per time step
Definition CouetteConfiguration.h:311
int couplingCycles
number of coupling cycles, that is continuum time steps; MD/DPD: 1000
Definition CouetteConfiguration.h:284
int wallInitCycles
number of coupling cycles that will be done, while the wall velocity is the wallInitVelocity
Definition CouetteConfiguration.h:276
MicroSolverType miSolverType
the type of md solver
Definition CouetteConfiguration.h:303