CFDEMcoupling  2.4
 All Classes
checkModelType.H
1 
2  // check model type
3  // referring to: Zhou et al. 2010,JFM
4  word modelType = particleCloud.modelType();
5 
6  //Warning << "model type not being checked" << endl;
7  if (modelType=="Bfull"){
8  Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
9 
10  // check if Archimedes is used
11  bool found=false;
12  forAll(particleCloud.forceModels(),i)
13  {
14  if(particleCloud.forceModels()[i]=="Archimedes")
15  found=true;
16  }
17  if(!found)
18  FatalError <<"Archimedes model not found!\n" << abort(FatalError);
19 
20  // check if gradPForce is used
21  found=false;
22  forAll(particleCloud.forceModels(),i)
23  {
24  if(particleCloud.forceModels()[i]=="gradPForce")
25  found=true;
26  }
27  if(!found)
28  FatalError <<"gradPForce model not found!\n" << abort(FatalError);
29 
30  // check if viscForce is used
31  found=false;
32  forAll(particleCloud.forceModels(),i)
33  {
34  if(particleCloud.forceModels()[i]=="viscForce")
35  found=true;
36  }
37  if(!found)
38  FatalError <<"viscForce model not found!\n" << abort(FatalError);
39 
40  }else if(modelType=="B"){
41  Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
42 
43  // check if Archimedes is used
44  bool found=false;
45  forAll(particleCloud.forceModels(),i)
46  {
47  if(particleCloud.forceModels()[i]=="Archimedes")
48  found=true;
49  }
50  if(!found)
51  FatalError <<"Archimedes model not found!\n" << abort(FatalError);
52 
53 
54 
55  // check if gradP and viscForce are used
56  found=false;
57  forAll(particleCloud.forceModels(),i)
58  {
59  if(particleCloud.forceModels()[i]=="gradPForce" || particleCloud.forceModels()[i]=="viscForce")
60  found=true;
61  }
62  if(found)
63  FatalError <<"do not use gradPForce and viscForce with model type B!\n" << abort(FatalError);
64 
65  }else if (modelType=="A"){
66  Info << "solving volume averaged Navier Stokes equations of type A\n"
67  << "check if Archimedes lift is necessary (depends on pressure formulation)\n"<< endl;
68 
69  // check if Archimedes is used
70  bool found=false;
71  forAll(particleCloud.forceModels(),i)
72  {
73  if(particleCloud.forceModels()[i]=="Archimedes")
74  found=true;
75  }
76  if(found)
77  Info << "WARNING!!! Are you sure to use Archimedes lift, not necessary if gradPForce includes this effect." << endl;
78 
79  // check if gradP is used
80  found=false;
81  forAll(particleCloud.forceModels(),i)
82  {
83  if(particleCloud.forceModels()[i]=="gradPForce")
84  found=true;
85  }
86  if(!found)
87  FatalError <<"gradPForce model not found!\n" << abort(FatalError);
88 
89  // check if viscForce is used
90  found=false;
91  forAll(particleCloud.forceModels(),i)
92  {
93  if(particleCloud.forceModels()[i]=="viscForce")
94  found=true;
95  }
96  if(!found)
97  FatalError <<"viscForce model not found!\n" << abort(FatalError);
98  }else if (modelType=="none")
99  Warning << "You chose model type -none- you might get erroneous results!" << endl;
100  else
101  FatalError <<"no suitable model type specified:" << modelType << "\n" << abort(FatalError);