circular_boulder_solar_radiation.cc File Reference
#include <fenv.h>
#include "generic.h"
#include "unsteady_heat.h"
#include "solid.h"
#include "contact_elements.h"
#include "heat_transfer_and_melt_elements.h"
#include "temporary_stefan_boltzmann_elements.h"
#include "meshes/triangle_mesh.h"

Classes

class  SolarRadiationProblem< ELEMENT >
 Problem class. More...
 

Namespaces

 ProblemParameters
 Namespace for exact solution and problem parameters.
 
 ExactSolution
 Namespace for exact solution.
 

Macros

#define ADAPTIVE
 

Functions

void ProblemParameters::atmospheric_radiation (const double &time, double &solar_flux_magnitude, Vector< double > &solar_flux_unit_vector, double &total_diffuse_radiation)
 
void ExactSolution::get_exact_u_for_unsteady_heat_validation (const double &t, const Vector< double > &x, Vector< double > &u)
 Exact solution as a Vector. More...
 
void ExactSolution::get_exact_u_for_unsteady_heat_validation (const double &t, const Vector< double > &x, double &u)
 Exact solution as a scalar. More...
 
void ExactSolution::get_source_for_unsteady_heat_validation (const double &t, const Vector< double > &x, double &source)
 Source function to make it an exact solution. More...
 
void ExactSolution::flux_into_bulk (const double &t, const Vector< double > &x, const Vector< double > &n, const double &u, double &flux)
 
void ExactSolution::prescribed_flux_for_unsteady_heat_validation (const double &t, const Vector< double > &x, const Vector< double > &n, const double &u, double &flux)
 
double ExactSolution::melting_surface_height (const double &t, const double &x)
 Height of melting surface. More...
 
int main (int argc, char *argv[])
 Driver code. More...
 

Variables

double ProblemParameters::Diffuse_radiation =0.4147111183
 Diffuse radiation (based on 300 W/m^2) More...
 
double ProblemParameters::Direct_radiation =1.382370394
 Direct radiation for peak of 1000 W/m^2. More...
 
double ProblemParameters::One_day =0.4084910633
 One day in our non-dim units. More...
 
double ProblemParameters::Alpha_rock =0.001
 Nondim thermal inertia for rock. More...
 
double ProblemParameters::Beta_rock =10.0
 Nondim thermal conductivity for rock. More...
 

Macro Definition Documentation

◆ ADAPTIVE

#define ADAPTIVE

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

1346 {
1347 
1348  // hierher
1349  FiniteElement::Accept_negative_jacobian=true;
1350  FiniteElement::Tolerance_for_singular_jacobian=0.0;
1351 
1352  // Store command line arguments
1353  CommandLineArgs::setup(argc,argv);
1354 
1355  // Define possible command line arguments and parse the ones that
1356  // were actually specified
1357 
1358  // Suppress adaptation
1360 
1361  // Parse command line
1363 
1364  // Doc what has actually been specified on the command line
1366 
1367  // Create generalised Hookean constitutive equations
1370 
1371 
1372  // Define centre of penetrator
1373  ProblemParameters::Centre.resize(2);
1376 
1377  // Create penetrator
1381 
1382 #ifdef ADAPTIVE
1383 
1384  // Build problem
1387  problem;
1388 
1389  #else
1390 
1391  // Build problem
1393 
1394 
1395 #endif
1396 
1397  //Output initial condition
1398  problem.doc_solution();
1399 
1400  unsigned max_adapt=1;
1402  {
1403  max_adapt=0;
1404  }
1405 
1406 
1407  // Number of parameter increments per period
1408  unsigned nstep_for_period=100;
1409 
1410  // Parameter variation
1411  unsigned nperiod=3;
1412 
1413  // Initial timestep
1414  double dt=1.0/double(nstep_for_period);
1415 
1416  // Initialise timestep -- also sets the weights for all timesteppers
1417  // in the problem.
1418  problem.initialise_dt(dt);
1419 
1420  // Set impulsive IC
1421  problem.assign_initial_values_impulsive(dt);
1422 
1423  while (problem.time_pt()->time()<double(nperiod))
1424  {
1425 #ifdef ADAPTIVE
1426 
1427  // Dummy double adaptivity (timestep is always accepted because
1428  // tolerance is set to huge value; mainly used to automatically
1429  // re-solve with smaller timestep increment after non-convergence
1430  double epsilon_t=DBL_MAX;
1431  bool first=false;
1432  double next_dt=
1433  problem.doubly_adaptive_unsteady_newton_solve(dt,epsilon_t,
1434  max_adapt,first);
1435  dt = next_dt;
1436 
1437 #else
1438 
1439  // hierher
1440  abort();
1441 
1442  // Solve
1443  problem.newton_solve();
1444 
1445 #endif
1446 
1447 
1448  //Output solution
1449  problem.doc_solution();
1450 
1451  }
1452 
1453 } // end of main
Problem class.
Definition: circular_boulder_solar_radiation.cc:255
Penetrator – here implemented as a circle.
Definition: contact_elements.h:249
Definition: constitutive_laws.h:699
UnsteadyHeat upgraded to become projectable.
Definition: unsteady_heat_elements.h:699
Definition: pseudosolid_node_update_elements.h:58
Definition: solid_elements.h:1756
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
Penetrator * Penetrator_pt
Penetrator.
Definition: circular_boulder_melt.cc:88
Vector< double > Centre
Position of centre of penetrator.
Definition: circular_boulder_melt.cc:85
double Y_c_initial
Initial y position of centre of penetrator.
Definition: circular_boulder_melt.cc:82
double Radius
Radius of penetrator.
Definition: circular_boulder_melt.cc:79
double Nu
Poisson's ratio.
Definition: unstructured_two_d_curved.cc:65
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
Definition: circular_boulder_melt.cc:76
bool command_line_flag_has_been_set(const std::string &flag)
Definition: oomph_utilities.cc:501
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References ProblemParameters::Centre, oomph::CommandLineArgs::command_line_flag_has_been_set(), ProblemParameters::Constitutive_law_pt, oomph::CommandLineArgs::doc_specified_flags(), ProblemParameters::Nu, oomph::CommandLineArgs::parse_and_assign(), ProblemParameters::Penetrator_pt, problem, ProblemParameters::Radius, Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and ProblemParameters::Y_c_initial.