Commit 913b463d authored by Robert Caulk's avatar Robert Caulk

fix 16.04 compiler error, add engine description for documentation

parent dde4a866
Pipeline #71466451 passed with stages
in 23 minutes and 3 seconds
......@@ -133,7 +133,7 @@ void ThermalEngine::setReynoldsNumbers(){
}
const double avgCellFluidVel = sqrt(cell->info().averageVelocity().squared_length());
double Reynolds = flow->solver->fluidRho*avgCellFluidVel*charLength/flow->viscosity;
if (Reynolds<0 || isnan(Reynolds)){cerr<<"Reynolds is negative or nan"<<endl; Reynolds = 0;}
if (Reynolds<0 || std::isnan(Reynolds)){cerr<<"Reynolds is negative or nan"<<endl; Reynolds = 0;}
if (Reynolds > 1000 || poro<0.35){
Nusselt = 2. + 0.6*pow(Reynolds,0.5)*pow(Pr,0.33333);
cell->info().Reynolds = Reynolds;
......@@ -471,11 +471,11 @@ void ThermalEngine::computeFluidFluidConduction() {
//if (distance < area) continue; // hexagonal packings result in extremely small distances that blow up the simulation
const double thermalResist = fluidK*area/distance;
conductionEnergy = thermalResist * delT * thermalDT;
if (isnan(conductionEnergy)) conductionEnergy=0;
if (std::isnan(conductionEnergy)) conductionEnergy=0;
cell->info().stabilityCoefficient+=thermalResist;
//cout << "conduction distance" << distance << endl;
if (!cell->info().Tcondition && !isnan(conductionEnergy)) cell->info().internalEnergy -= conductionEnergy;
if (!neighborCell->info().Tcondition && !isnan(conductionEnergy)) neighborCell->info().internalEnergy += conductionEnergy;
if (!cell->info().Tcondition && !std::isnan(conductionEnergy)) cell->info().internalEnergy -= conductionEnergy;
if (!neighborCell->info().Tcondition && !std::isnan(conductionEnergy)) neighborCell->info().internalEnergy += conductionEnergy;
//cout << "added conduction energy"<< conductionEnergy << endl;
}
......
......@@ -95,7 +95,7 @@ class ThermalEngine : public PartialEngine
Real getThermalDT() {return thermalDT;}
int getConductionIterPeriod() {return conductionIterPeriod;}
Real getMaxTimeStep() {return maxTimeStep;}
YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(ThermalEngine,PartialEngine,"preliminary",
YADE_CLASS_BASE_DOC_ATTRS_INIT_CTOR_PY(ThermalEngine,PartialEngine,"An engine typically used in combination with FlowEngine to simulate thermal-hydraulic-mechanical processes. Framework description and demonstration presented within the following paper: Caulk, R. and Chareyre, B. (2019) An open framework for the simulation of thermal-hydraulic-mechanical processes in discrete element systems. Thermal Process Engineering: Proceedings of DEM8, Enschede Netherlands, July 2019.",
/*attributes*/
((bool,advection,true,,"Activates advection"))
((bool,fluidConduction,true,,"Activates conduction within fluid"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment