hstop_relaunch.cpp File Reference
#include "SilbertPeriodic.h"

Classes

class  SilbertHstop
 

Functions

bool PointIsAboveCurve (Mdouble h, Mdouble a, int study_num)
 
void HstopCurve (int study_num, Mdouble h, Mdouble a)
 
int main (int argc, char *argv[])
 

Variables

fstream ReportFile
 

Function Documentation

◆ HstopCurve()

void HstopCurve ( int  study_num,
Mdouble  h,
Mdouble  a 
)
118 {
119  cout << "restart at study_num=" << study_num << ", h=" << h << ", a=" << a << endl;
120 
121  Mdouble hMax = 60; //height at which bisection algorithm stops
122  Mdouble dh = 2; //how much I decrease the height after a point is found
123  Mdouble da = .5; // how exact I want the angle to be determined
124 
125  stringstream name;
126  name << "Report" << study_num;
127  ReportFile.open(name.str().c_str(),fstream::out | fstream::app);
128  //~ ReportFile << "height\tangle\tlambda\tmu\tabovemuBottom\tabove\n";
129 
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-=da;
136  else h+=dh;
137  stringstream command;
138  command << "~/hstop/runstat.sh " << study_num << " " << h << " " << a << "&";
139  int sysret;
140  sysret = system (command.str().c_str());
141  }
142 
143  return;
144 }
bool PointIsAboveCurve(Mdouble h, Mdouble a, int study_num)
Definition: hstop_relaunch.cpp:92
fstream ReportFile
Definition: hstop_relaunch.cpp:90
const Scalar * a
Definition: level2_cplx_impl.h:32
string name
Definition: plotDoE.py:33
std::ofstream out("Result.txt")

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

Referenced by main().

◆ main()

int main ( int argc  ,
char argv[] 
)
147 {
148  if (argc>3)
149  HstopCurve(atoi(argv[1]),atof(argv[2]),atof(argv[3]));
150  else exit(-1);
151 }
void HstopCurve(int study_num, Mdouble h, Mdouble a)
Definition: hstop_relaunch.cpp:117

References HstopCurve().

◆ PointIsAboveCurve()

bool PointIsAboveCurve ( Mdouble  h,
Mdouble  a,
int  study_num 
)
92  {
94  problem.setInflowHeight(h) ;
95  problem.setChuteAngle(a);
96  problem.set_study(study_num);
97  stringstream name;
98  name << "H" << problem.getInflowHeight()
99  << "A" << problem.getChuteAngleDegrees()
100  << "L" << round(100.*problem.getFixedParticleRadius()*2.)/100.
101  << "M" << problem.getSlidingFrictionCoefficient()
102  << "B" << problem.getSlidingFrictionCoefficientBottom();
103  problem.setName(name.str().c_str());
104  cout << "starting " << name.str().c_str() << endl;
105  problem.solve_analytic();
106  stringstream com;
107  ReportFile << problem.getInflowHeight()
108  << "\t" << problem.getChuteAngleDegrees()
109  << "\t" << round(100.*problem.getFixedParticleRadius()*2.)/100.
110  << "\t" << problem.getSlidingFrictionCoefficient()
111  << "\t" << problem.getSlidingFrictionCoefficientBottom()
112  << "\t" << problem.pointIsAboveCurve
113  << endl;
114  return problem.pointIsAboveCurve;
115 }
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().