circular_boulder_melt.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 "meshes/triangle_mesh.h"

Classes

class  MeltContactProblem< ELEMENT >
 Problem class. More...
 

Namespaces

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

Macros

#define ADAPTIVE
 

Functions

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...
 
double ExactSolution::melting_surface_height (const double &t, const double &x)
 Height of melting surface. More...
 
void ExactSolution::analytical_outer_unit_normal (const double &t, const Vector< double > &x, double &nx, double &ny)
 Analytical outer unit normal. 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)
 
int main (int argc, char *argv[])
 Driver code. More...
 

Variables

double ProblemParameters::Melt_temperature =0.0
 Melt-temperature. More...
 
ConstitutiveLawProblemParameters::Constitutive_law_pt =0
 Pointer to constitutive law. More...
 
double ProblemParameters::Radius =0.2
 Radius of penetrator. More...
 
double ProblemParameters::Y_c_initial =1.05
 Initial y position of centre of penetrator. More...
 
Vector< doubleProblemParameters::Centre
 Position of centre of penetrator. More...
 
PenetratorProblemParameters::Penetrator_pt =0
 Penetrator. More...
 
double ExactSolution::U0 =0.0
 Constant/initial temperature. More...
 
double ExactSolution::Growth_rate =1.0
 Growth rate for interface. More...
 
bool ExactSolution::Use_analytical_outer_unit_normal =true
 Use analytical outer unit normal when computing fluxes? More...
 
double ExactSolution::Omega_cos =0.0
 

Macro Definition Documentation

◆ ADAPTIVE

#define ADAPTIVE

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver code.

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

1240 {
1242 
1243  // hierher
1244 // FiniteElement::Accept_negative_jacobian=true;
1245 // FiniteElement::Tolerance_for_singular_jacobian=0.0;
1246 
1247  // Store command line arguments
1248  CommandLineArgs::setup(argc,argv);
1249 
1250  // Define possible command line arguments and parse the ones that
1251  // were actually specified
1252 
1253  // Suppress adaptation
1255 
1256  // Parse command line
1258 
1259  // Doc what has actually been specified on the command line
1261 
1262  // Create generalised Hookean constitutive equations
1265 
1266 
1267  // Define centre of penetrator
1268  ProblemParameters::Centre.resize(2);
1271 
1272  // Create penetrator
1276 
1277 #ifdef ADAPTIVE
1278 
1279  // Build problem
1282  problem;
1283 
1284  //ProjectablePVDElement<TPVDElement<2,3> > > problem;
1285 
1286 #else
1287 
1288  // Build problem
1290 
1291 
1292 #endif
1293 
1294  //Output initial condition
1295  problem.doc_solution();
1296 
1297  unsigned max_adapt=1;
1299  {
1300  max_adapt=0;
1301  }
1302 
1303  // // Set number of steps
1304  // unsigned nstep = 100;
1305  // if (CommandLineArgs::command_line_flag_has_been_set("--validate"))
1306  // {
1307  // nstep=5;
1308  // }
1309 
1310 
1311 
1312  // Number of parameter increments per period
1313  unsigned nstep_for_period=100;
1314 
1315  // Parameter variation
1316  unsigned nperiod=3;
1317 
1318  // Initial timestep
1319  double dt=1.0/double(nstep_for_period);
1320 
1321  // Initialise timestep -- also sets the weights for all timesteppers
1322  // in the problem.
1323  problem.initialise_dt(dt);
1324 
1325  // Set impulsive IC
1326  problem.assign_initial_values_impulsive(dt);
1327 
1328  while (problem.time_pt()->time()<double(nperiod))
1329  {
1330 #ifdef ADAPTIVE
1331 
1332  // Dummy double adaptivity (timestep is always accepted because
1333  // tolerance is set to huge value; mainly used to automatically
1334  // re-solve with smaller timestep increment after non-convergence
1335  double epsilon_t=DBL_MAX;
1336  bool first=false;
1337  unsigned suppress_resolve_after_spatial_adapt_flag=0;
1338  double next_dt=
1339  problem.doubly_adaptive_unsteady_newton_solve(
1340  dt,
1341  epsilon_t,
1342  max_adapt,
1343  suppress_resolve_after_spatial_adapt_flag,
1344  first);
1345  dt = next_dt;
1346 
1347 #else
1348 
1349  // hierher
1350  abort();
1351 
1352  // Solve
1353  problem.newton_solve();
1354 
1355 #endif
1356 
1357 
1358  //Output solution
1359  problem.doc_solution();
1360 
1361  }
1362 
1363 } // end of main
Problem class.
Definition: circular_boulder_melt.cc:253
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
unsigned Number
The unsigned.
Definition: oomph_definitions.cc:269
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::Global_unsigned::Number, 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.