hstop_restart.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 
)
116 {
117  cout << "restart at study_num=" << study_num << ", h=" << h << ", a=" << a << endl;
118 
119  Mdouble hMax = 60; //height at which bisection algorithm stops
120  Mdouble dh = 2; //how much I decrease the height after a point is found
121  Mdouble da = .5; // how exact I want the angle to be determined
122 
123  stringstream name;
124  name << "Report" << study_num;
125  ReportFile.open(name.str().c_str(),fstream::out);
126  ReportFile << "height\tangle\tlambda\tmu\tabovemuBottom\tabove\n";
127 
128  //now increase height gradually; decrease angle if flow starts
129  for (; h<hMax; h+=dh) while (PointIsAboveCurve(h,a,study_num)) a-=da;
130 
131  ReportFile.close();
132  return;
133 }
bool PointIsAboveCurve(Mdouble h, Mdouble a, int study_num)
Definition: hstop_restart.cpp:90
fstream ReportFile
Definition: hstop_restart.cpp:88
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[] 
)
136 {
137  if (argc>3)
138  HstopCurve(atoi(argv[1]),atof(argv[2]),atof(argv[3]));
139  else exit(-1);
140 }
void HstopCurve(int study_num, Mdouble h, Mdouble a)
Definition: hstop_restart.cpp:115

References HstopCurve().

◆ PointIsAboveCurve()

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