obsolete_codes/hstopGlass_StudyHeightHmaxAngle.cpp File Reference
#include "GlasPeriodic.h"

Classes

class  SilbertHstop
 

Functions

bool PointIsAboveCurve (Mdouble h, Mdouble a, int study_num)
 
int HstopCurve (string cmd UNUSED, int study_num, Mdouble h, Mdouble hMax, Mdouble a)
 
int main (int argc, char *argv[])
 

Variables

fstream ReportFile
 

Function Documentation

◆ HstopCurve()

int HstopCurve ( string cmd  UNUSED,
int  study_num,
Mdouble  h,
Mdouble  hMax,
Mdouble  a 
)
123 {
124  cout << "restart at study_num=" << study_num << ", h=" << h << ", a=" << a << endl;
125 
126  stringstream name;
127  name << "Report" << study_num;
128  ReportFile.open(name.str().c_str(),fstream::out | fstream::app);
129  //~ ReportFile << "height\tangle\tlambda\tmu\tabovemuBottom\tabove\n";
130  bool piac = PointIsAboveCurve(h,a,study_num);
131  ReportFile.close();
132 
133  //now increase height gradually; decrease angle if flow starts
134  if (h<hMax) {
135  if (piac) a-=.5;
136  else h+=2;
137  stringstream command;
138  // for msm1:
139  command << "nohup nice -18 ../hstopGlass_StudyHeightHmaxAngle.exe " << study_num << " " << h << " " << hMax << " " << a << " &>>outS" << study_num << "H" << h << "HMax" << hMax << "A" << a << " &";
140  // for einder:
141  //command << "name="<<cmd<<" && cd ${name/hstop_StudyHeightHmaxAngle.exe/} && ~/clusterscriptexecute $name " << study_num << " " << h << " " << hMax << " " << a << "&";
142  cout << command.str() << endl;
143  return system (command.str().c_str());
144  } else {
145  return 0;
146  }
147 }
const Scalar * a
Definition: level2_cplx_impl.h:32
string name
Definition: plotDoE.py:33
bool PointIsAboveCurve(Mdouble h, Mdouble a, int study_num)
Definition: obsolete_codes/hstopGlass_StudyHeightHmaxAngle.cpp:90
fstream ReportFile
Definition: obsolete_codes/hstopGlass_StudyHeightHmaxAngle.cpp:88
std::ofstream out("Result.txt")

References a, plotDoE::name, out(), PointIsAboveCurve(), and ReportFile.

Referenced by main().

◆ main()

int main ( int argc  ,
char argv[] 
)
150 {
151  if (argc<4) { cout << "Please specify Study, Height, max. Height and Angle" << endl; exit(-1); }
152  HstopCurve(argv[0],atoi(argv[1]),atof(argv[2]),atof(argv[3]),atof(argv[4]));
153 }
int HstopCurve(string cmd UNUSED, int study_num, Mdouble h, Mdouble hMax, Mdouble a)
Definition: obsolete_codes/hstopGlass_StudyHeightHmaxAngle.cpp:122

References HstopCurve().

◆ PointIsAboveCurve()

bool PointIsAboveCurve ( Mdouble  h,
Mdouble  a,
int  study_num 
)
90  {
91  cout << "PointIsAboveCurve(" << study_num << ", h=" << h << ", a=" << a << ")" << endl;
93  problem.setInflowHeight(h) ;
94  problem.setChuteAngle(a);
95  problem.set_study(study_num);
96  stringstream name;
97  name << "H" << problem.getInflowHeight()
98  << "A" << problem.getChuteAngleDegrees()
99  << "L" << round(100.*problem.getFixedParticleRadius()*2.)/100.
100  << "M" << problem.getSlidingFrictionCoefficient()
101  << "B" << problem.getSlidingFrictionCoefficientBottom();
102  problem.setName(name.str().c_str());
103  cout << "starting " << name.str().c_str() << endl;
104  // if you want more restart output, use these options
105  //problem.restartFile.setFileType(FileType::MULTIPLE_FILES_PADDED);
106  // for real runs:
107  //~ problem.set_Hertzian(true);
108  problem.solve();
109  // for test runs:
110  //problem.solve_analytic();
111  stringstream com;
112  ReportFile << problem.getInflowHeight()
113  << "\t" << problem.getChuteAngleDegrees()
114  << "\t" << round(100.*problem.getFixedParticleRadius()*2.)/100.
115  << "\t" << problem.getSlidingFrictionCoefficient()
116  << "\t" << problem.getSlidingFrictionCoefficientBottom()
117  << "\t" << problem.pointIsAboveCurve
118  << endl;
119  return problem.pointIsAboveCurve;
120 }
Definition: hstop_StudyHeightHmaxAngle.cpp:12
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 round(const bfloat16 &a)
Definition: BFloat16.h:646
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References a, plotDoE::name, problem, ReportFile, and Eigen::bfloat16_impl::round().

Referenced by HstopCurve().

Variable Documentation

◆ ReportFile

fstream ReportFile

Referenced by HstopCurve(), and PointIsAboveCurve().