LCOV - code coverage report
Current view: top level - src/materials - ConcreteThermalMoisture.C (source / functions) Hit Total Coverage
Test: idaholab/blackbear: 276f95 Lines: 337 374 90.1 %
Date: 2025-10-28 03:10:25 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /*               DO NOT MODIFY THIS HEADER                      */
       3             : /*                       BlackBear                              */
       4             : /*                                                              */
       5             : /*           (c) 2017 Battelle Energy Alliance, LLC             */
       6             : /*                   ALL RIGHTS RESERVED                        */
       7             : /*                                                              */
       8             : /*          Prepared by Battelle Energy Alliance, LLC           */
       9             : /*            Under Contract No. DE-AC07-05ID14517              */
      10             : /*            With the U. S. Department of Energy               */
      11             : /*                                                              */
      12             : /*            See COPYRIGHT for full restrictions               */
      13             : /****************************************************************/
      14             : 
      15             : #include "ConcreteThermalMoisture.h"
      16             : #include "MooseObjectName.h"
      17             : 
      18             : // libMesh includes
      19             : #include "libmesh/quadrature.h"
      20             : 
      21             : registerMooseObject("BlackBearApp", ConcreteThermalMoisture);
      22             : 
      23             : InputParameters
      24        2102 : ConcreteThermalMoisture::validParams()
      25             : {
      26        2102 :   InputParameters params = Material::validParams();
      27        4204 :   params.addRequiredParam<std::string>(
      28             :       "type", "A string representing the Moose Object that is used to call this class");
      29             : 
      30             :   // // parameters which will be deprecated soon
      31        4204 :   MooseEnum thermal_capacity_model("CONSTANT ASCE-1992 KODUR-2004 EUROCODE-2004");
      32        4204 :   MooseEnum thermal_conductivity_model("CONSTANT ASCE-1992 KODUR-2004 EUROCODE-2004 KIM-2003");
      33        4204 :   params.addDeprecatedParam<MooseEnum>("thermal_capacity_model",
      34             :                                        thermal_capacity_model,
      35             :                                        "thermal capacity models",
      36             :                                        "Use thermal_model instead");
      37        4204 :   params.addDeprecatedParam<MooseEnum>("thermal_conductivity_model",
      38             :                                        thermal_conductivity_model,
      39             :                                        "thermal conductivity models",
      40             :                                        "Use thermal_model instead");
      41        4204 :   MooseEnum moisture_diffusivity_model("Bazant Xi Mensi");
      42        4204 :   params.addDeprecatedParam<MooseEnum>("moisture_diffusivity_model",
      43             :                                        moisture_diffusivity_model,
      44             :                                        "moisture diffusivity models",
      45             :                                        "Use moisture_model instead");
      46        4204 :   params.addDeprecatedParam<Real>("ref_density_of_concrete",
      47             :                                   "refernece density of porous media Kg/m^3",
      48             :                                   "Use ref_density instead");
      49        4204 :   params.addDeprecatedParam<Real>("ref_specific_heat_of_concrete",
      50             :                                   "reference specific heat of concrete J/Kg/0C",
      51             :                                   "Use ref_specific_heat instead");
      52        4204 :   params.addDeprecatedParam<Real>("ref_thermal_conductivity_of_concrete",
      53             :                                   "reference thermal conductivity of concrete  W/m/0C",
      54             :                                   "Use ref_thermal_conductivity instead");
      55             : 
      56             :   // available model for thermal and moisture transport
      57        4204 :   MooseEnum thermal_model("CONSTANT ASCE-1992 KODUR-2004 EUROCODE-2004");
      58        4204 :   params.addParam<MooseEnum>(
      59             :       "thermal_model", thermal_model, "Model for properties used in thermal");
      60        4204 :   MooseEnum moisture_model("Bazant Mensi Xi");
      61        4204 :   params.addParam<MooseEnum>(
      62             :       "moisture_model", moisture_model, "Model for properties used in moisture transport");
      63             : 
      64             :   // concrete properties
      65        4204 :   MooseEnum cement_type("1 2 3 4");
      66        4204 :   MooseEnum aggregate_type("Siliceous Carbonate");
      67        4204 :   MooseEnum aggregate_pore_type("dense porous");
      68        4204 :   params.addParam<MooseEnum>(
      69             :       "cement_type", cement_type, "Cement type input for moisture capacity calculations");
      70        4204 :   params.addParam<MooseEnum>("aggregate_type", aggregate_type, "Type of aggregate");
      71        4204 :   params.addParam<MooseEnum>(
      72             :       "aggregate_pore_type", aggregate_pore_type, "Aggregate pore structure");
      73             : 
      74        4204 :   params.addParam<Real>("cement_mass", "Cement mass per m^3");
      75        4204 :   params.setDocUnit("cement_mass", "kg");
      76        4204 :   params.addParam<Real>("aggregate_mass", "Aggregate mass per m^3");
      77        4204 :   params.setDocUnit("aggregate_mass", "kg");
      78        4204 :   params.addParam<Real>("water_to_cement_ratio", "Water to cement ratio");
      79        4204 :   params.addParam<Real>("aggregate_vol_fraction", "Volumetric fraction of aggregates");
      80        4204 :   params.addParam<Real>("concrete_cure_time", "Concrete curing time");
      81        4204 :   params.setDocUnit("concrete_cure_time", "day");
      82        4204 :   params.addParam<Real>("ref_density", "Reference density of concrete");
      83        4204 :   params.setDocUnit("ref_density", "kg/m^3");
      84        4204 :   params.addParam<Real>("ref_specific_heat", "Reference specific heat of concrete");
      85        4204 :   params.setDocUnit("ref_specific_heat", "J/kg/K");
      86        4204 :   params.addParam<Real>("ref_thermal_conductivity", "Concrete reference thermal conductivity");
      87        4204 :   params.setDocUnit("ref_thermal_conductivity", "W/m/K");
      88             : 
      89             :   // parameters for Bazant mositure transport model
      90        4204 :   params.addParam<Real>("D1", "Empirical constant for Bazant moisture transport model");
      91        4204 :   params.setDocUnit("D1", "m^2/s");
      92        4204 :   params.addParam<Real>("n", "Empirical constant for Bazant moisture transport model");
      93        4204 :   params.setDocUnit("n", "unitless");
      94        4204 :   params.addParam<Real>("critical_relative_humidity",
      95             :                         "Critical relative humidity, used for Bazant moisture transport model");
      96        4204 :   params.setDocUnit("critical_relative_humidity", "unitless");
      97        4204 :   params.addParam<Real>("coupled_moisture_diffusivity_factor",
      98             :                         "Coupling coefficient mositure transfer due to heat");
      99        4204 :   params.setDocUnit("coupled_moisture_diffusivity_factor", "unitless");
     100             : 
     101             :   // parameters for Mensi's moisture model
     102        4204 :   params.addParam<Real>("A", "Empirical constant used by Mensi moisture transport model");
     103        4204 :   params.setDocUnit("A", "m^2/s");
     104        4204 :   params.addParam<Real>("B", "Empirical constants used by Mensi moisture transport model");
     105        4204 :   params.setDocUnit("B", "m^3/kg");
     106             : 
     107        4204 :   params.addCoupledVar("relative_humidity", "Nonlinear variable name for relative humidity");
     108        4204 :   params.addCoupledVar("temperature", "Coupled variable for temperature");
     109        4204 :   params.setDocUnit("temperature", "degC");
     110        2102 :   params.addClassDescription("Material parameters for thermal and moisture transport in concrete.");
     111             : 
     112        2102 :   return params;
     113        2102 : }
     114             : 
     115        1629 : ConcreteThermalMoisture::ConcreteThermalMoisture(const InputParameters & parameters)
     116             :   : Material(parameters),
     117        1629 :     _thermal_model(getParam<MooseEnum>("thermal_model")),
     118        3258 :     _moisture_model(getParam<MooseEnum>("moisture_model")),
     119             : 
     120             :     // concrete mix proportion paramters
     121        5802 :     _cement_mass(isParamValid("cement_mass") ? getParam<Real>("cement_mass") : 0),
     122        5292 :     _aggregate_mass(isParamValid("aggregate_mass") ? getParam<Real>("aggregate_mass") : 0),
     123        5802 :     _water_to_cement(isParamValid("water_to_cement_ratio") ? getParam<Real>("water_to_cement_ratio")
     124             :                                                            : 0),
     125             : 
     126             :     // CONSTANT thermal trasport model parameters
     127        4812 :     _input_density(isParamValid("ref_density") ? getParam<Real>("ref_density") : 0),
     128        4812 :     _input_specific_heat(isParamValid("ref_specific_heat") ? getParam<Real>("ref_specific_heat")
     129             :                                                            : 0),
     130        1629 :     _input_thermal_conductivity(
     131        3714 :         isParamValid("ref_thermal_conductivity") ? getParam<Real>("ref_thermal_conductivity") : 0),
     132             : 
     133             :     // asce_1992 and kodur_2004 thermal model parameters
     134        3258 :     _aggregate_type(getParam<MooseEnum>("aggregate_type")),
     135             : 
     136             :     // Bazant moisture model parameters
     137        5106 :     _D1(isParamValid("D1") ? getParam<Real>("D1") : 0),
     138        3954 :     _n_power(isParamValid("n") ? getParam<Real>("n") : 0),
     139        3954 :     _Hc(isParamValid("critical_relative_humidity") ? getParam<Real>("critical_relative_humidity")
     140             :                                                    : 0),
     141        1629 :     _alfa_Dht(isParamValid("coupled_moisture_diffusivity_factor")
     142        3309 :                   ? getParam<Real>("coupled_moisture_diffusivity_factor")
     143             :                   : 0),
     144             : 
     145             :     // Mensi moisture model parameters
     146        4104 :     _A(isParamValid("A") ? getParam<Real>("A") : 0),
     147        4104 :     _B(isParamValid("B") ? getParam<Real>("B") : 0),
     148             : 
     149             :     // Xi moisture model parameters
     150        3258 :     _cement_type(getParam<MooseEnum>("cement_type")),
     151        3258 :     _aggregate_pore_type(getParam<MooseEnum>("aggregate_pore_type")),
     152        1629 :     _agg_vol_fraction(
     153        5124 :         isParamValid("aggregate_vol_fraction") ? getParam<Real>("aggregate_vol_fraction") : 0),
     154        5124 :     _cure_time(isParamValid("concrete_cure_time") ? getParam<Real>("concrete_cure_time") : 0),
     155             : 
     156             :     // material properties asscociated with coupled mositure/thermal transfer through concrete
     157        1629 :     _thermal_capacity(declareProperty<Real>("thermal_capacity")),
     158        1629 :     _thermal_conductivity(declareProperty<Real>("thermal_conductivity")),
     159        1629 :     _ca(declareProperty<Real>("heat_absorption_of_water")),
     160        1629 :     _cw(declareProperty<Real>("thermal_capacity_of_water")),
     161        1629 :     _moisture_capacity((_moisture_model == "Xi") ? &declareProperty<Real>("moisture_capacity")
     162             :                                                  : nullptr),
     163             : 
     164        1629 :     _Dh(declareProperty<Real>("humidity_diffusivity")),
     165        1629 :     _Dht(declareProperty<Real>("humidity_diffusivity_thermal")),
     166        1629 :     _eqv_age(declareProperty<Real>("eqv_age")),
     167        3258 :     _eqv_age_old(getMaterialPropertyOld<Real>("eqv_age")),
     168             : 
     169        1629 :     _has_rh(isCoupled("relative_humidity")),
     170        1629 :     _rh(_has_rh ? coupledValue("relative_humidity") : _zero),
     171             : 
     172        1629 :     _has_temperature(isCoupled("temperature")),
     173        3258 :     _temp(_has_temperature ? coupledValue("temperature") : _zero)
     174             : {
     175             :   Real parameter_error_check = true;
     176        3258 :   if (parameters.isParamSetByUser("thermal_capacity_model"))
     177             :   {
     178           0 :     _thermal_model = getParam<MooseEnum>("thermal_capacity_model");
     179           0 :     _input_density = isParamValid("ref_density_of_concrete")
     180           0 :                          ? getParam<Real>("ref_density_of_concrete")
     181             :                          : 2231.0;
     182           0 :     _input_specific_heat = isParamValid("ref_specific_heat_of_concrete")
     183           0 :                                ? getParam<Real>("ref_specific_heat_of_concrete")
     184             :                                : 1100.0;
     185           0 :     _input_thermal_conductivity = isParamValid("ref_thermal_conductivity_of_concrete")
     186           0 :                                       ? getParam<Real>("ref_thermal_conductivity_of_concrete")
     187             :                                       : 3.0;
     188           0 :     _aggregate_type = isParamValid("aggregate_type") ? getParam<MooseEnum>("aggregate_type") : 0;
     189             :     parameter_error_check = false;
     190             :   }
     191             :   if (parameter_error_check)
     192             :   {
     193        1629 :     if (_thermal_model == "CONSTANT")
     194             :     {
     195         462 :       if (!parameters.isParamSetByUser("ref_density"))
     196           3 :         mooseError("For CONSTANT thermal_model, ref_density must be defined.");
     197         456 :       if (!parameters.isParamSetByUser("ref_specific_heat"))
     198           3 :         mooseError("For constant thermal transport model, ref_specific_heat must be defined.");
     199         450 :       if (!parameters.isParamSetByUser("ref_thermal_conductivity"))
     200           3 :         mooseError(
     201             :             "For constant thermal transport model, ref_thermal_conductivity must be defined.");
     202             :     }
     203        1398 :     else if (_thermal_model == "ASCE-1992")
     204             :     {
     205         174 :       if (!parameters.isParamSetByUser("aggregate_type"))
     206           3 :         mooseError("For ASCE-1992 thermal model, aggregate_type must be defined.");
     207             :     }
     208        1311 :     else if (_thermal_model == "KODUR-2004")
     209             :     {
     210        1518 :       if (!parameters.isParamSetByUser("aggregate_type"))
     211           3 :         mooseError("For KODUR-2004 thermal model, aggregate_type must be defined.");
     212             :     }
     213         552 :     else if (_thermal_model == "EUROCODE-2004")
     214             :     {
     215        1104 :       if (!parameters.isParamSetByUser("ref_density"))
     216           3 :         mooseError("For EUROCODE-2004 thermal model, ref_density must be defined.");
     217        1098 :       if (!parameters.isParamSetByUser("ref_specific_heat"))
     218           3 :         mooseError("For EUROCODE-2004 thermal model, ref_specific_heat must be defined.");
     219             :     }
     220             :   }
     221             : 
     222             :   parameter_error_check = true;
     223             : 
     224        3216 :   if (parameters.isParamSetByUser("moisture_diffusivity_model"))
     225             :   {
     226           0 :     _moisture_model = getParam<MooseEnum>("moisture_diffusivity_model");
     227           0 :     _cement_mass = isParamValid("cement_mass") ? getParam<Real>("cement_mass") : 354.0;
     228           0 :     _water_to_cement =
     229           0 :         isParamValid("water_to_cement_ratio") ? getParam<Real>("water_to_cement_ratio") : 0.43;
     230           0 :     _cement_type = isParamValid("cement_type") ? getParam<MooseEnum>("cement_type") : 0;
     231             :     _aggregate_pore_type =
     232           0 :         isParamValid("aggregate_pore_type") ? getParam<MooseEnum>("aggregate_pore_type") : 0;
     233           0 :     _cure_time = isParamValid("concrete_cure_time") ? getParam<Real>("concrete_cure_time") : 23.0;
     234           0 :     _aggregate_mass = isParamValid("aggregate_mass") ? getParam<Real>("aggregate_mass") : 1877;
     235           0 :     _agg_vol_fraction =
     236           0 :         isParamValid("aggregate_vol_fraction") ? getParam<Real>("aggregate_vol_fraction") : 0.7;
     237           0 :     _D1 = isParamValid("D1") ? getParam<Real>("D1") : 3.0e-10;
     238           0 :     _Hc = isParamValid("critical_relative_humidity") ? getParam<Real>("critical_relative_humidity")
     239             :                                                      : 0.75;
     240           0 :     _n_power = isParamValid("n") ? getParam<Real>("n") : 6.0;
     241           0 :     _alfa_Dht = isParamValid("coupled_moisture_diffusivity_factor")
     242           0 :                     ? getParam<Real>("coupled_moisture_diffusivity_factor")
     243             :                     : 1.0e-5;
     244           0 :     _A = isParamValid("A") ? getParam<Real>("A") : 3.8e-13;
     245           0 :     _B = isParamValid("B") ? getParam<Real>("B") : 0.05;
     246             :     parameter_error_check = false;
     247             :   }
     248             : 
     249             :   if (parameter_error_check)
     250             :   {
     251        1608 :     if (_moisture_model == "Bazant")
     252             :     {
     253         660 :       if (!parameters.isParamSetByUser("D1"))
     254           3 :         mooseError("For Bazant moisture model, empirical constant D1 must be defined.");
     255         654 :       if (!parameters.isParamSetByUser("n"))
     256           3 :         mooseError("For Bazant moisture model, empirical constant n must be defined.");
     257         648 :       if (!parameters.isParamSetByUser("critical_relative_humidity"))
     258           3 :         mooseError("For Bazant moisture model, critical_relative_humidity must be defined.");
     259         642 :       if (!parameters.isParamSetByUser("coupled_moisture_diffusivity_factor"))
     260           3 :         mooseError(
     261             :             "For Bazant moisture model, coupled_moisture_diffusivity_factor must be defined.");
     262             :     }
     263        1278 :     else if (_moisture_model == "Mensi")
     264             :     {
     265         684 :       if (!parameters.isParamSetByUser("A"))
     266           3 :         mooseError("For Mensi moisture model, empirical constant A must be defined.");
     267         678 :       if (!parameters.isParamSetByUser("B"))
     268           3 :         mooseError("For Mensi moisture model, empirical constant B must be defined.");
     269         672 :       if (!parameters.isParamValid("cement_mass"))
     270           3 :         mooseError("For Mensi moisture model, cement_mass must be defined.");
     271         666 :       if (!parameters.isParamSetByUser("water_to_cement_ratio"))
     272           3 :         mooseError("For Mensi moisture model, water_to_cement_ratio must be defined.");
     273             :     }
     274         936 :     else if (_moisture_model == "Xi")
     275             :     {
     276        1872 :       if (!parameters.isParamSetByUser("cement_type"))
     277           3 :         mooseError("For Xi moisture model, cement_type must be defined.");
     278        1866 :       if (!parameters.isParamSetByUser("aggregate_pore_type"))
     279           3 :         mooseError("For Xi moisture model, aggregate_pore_type must be defined.");
     280        1860 :       if (!parameters.isParamSetByUser("aggregate_vol_fraction"))
     281           3 :         mooseError("For Xi moisture model, aggregate_vol_fraction must be defined.");
     282        1854 :       if (!parameters.isParamSetByUser("concrete_cure_time"))
     283           3 :         mooseError("For Xi moisture model, concrete_cure_time must be defined.");
     284        1848 :       if (!parameters.isParamValid("cement_mass"))
     285           3 :         mooseError("For Xi moisture model, cement_mass must be defined.");
     286        1842 :       if (!parameters.isParamSetByUser("aggregate_mass"))
     287           3 :         mooseError("For Xi moisture model, aggregate_mass must be defined.");
     288        1836 :       if (!parameters.isParamSetByUser("water_to_cement_ratio"))
     289           3 :         mooseError("For Xi moisture model, water_to_cement_ratio must be defined.");
     290         915 :       if (_water_to_cement < 0.5)
     291           3 :         mooseError("For Xi's moisture model water_to_cement_ratio must be >= 0.5 to use Xi's model "
     292             :                    "for moisture diffusivity");
     293             :     }
     294             :   }
     295        1560 : }
     296             : 
     297             : void
     298        9209 : ConcreteThermalMoisture::initQpStatefulProperties()
     299             : {
     300        9209 :   _eqv_age[_qp] = _cure_time;
     301        9209 : }
     302             : 
     303             : void
     304     1105463 : ConcreteThermalMoisture::computeProperties()
     305             : {
     306     3278466 :   for (unsigned int qp = 0; qp < _qrule->n_points(); ++qp)
     307             :   {
     308     2173015 :     Real T = _temp[qp];
     309     2173015 :     Real H = _rh[qp];
     310     2173015 :     if (H < 0.0)
     311             :       H = 0.0;
     312             : 
     313     2173015 :     Real ro = _input_density;
     314     2173015 :     Real Cv = _input_specific_heat;
     315             : 
     316             :     // compute concrete thermal capacity
     317     2173015 :     switch (_thermal_model)
     318             :     {
     319      352512 :       case 0: // CONSTANT
     320      352512 :         _thermal_capacity[qp] = ro * Cv;
     321      352512 :         _thermal_conductivity[qp] = _input_thermal_conductivity;
     322      352512 :         break;
     323       25564 :       case 1: // ASCE-1992 for normal strength concrete
     324       25564 :         switch (_aggregate_type)
     325             :         {
     326       12782 :           case 0: // siliceous aggreagte
     327       12782 :             if (T < 20.0)
     328         161 :               _thermal_capacity[qp] = 1.8 * 1e6;
     329       12621 :             else if (T >= 20.0 && T < 200.0)
     330        2905 :               _thermal_capacity[qp] = (0.005 * T + 1.7) * 1.0e6;
     331        9716 :             else if (T >= 200.0 && T < 400.0)
     332        3234 :               _thermal_capacity[qp] = 2.7 * 1.0e6;
     333        6482 :             else if (T >= 400.0 && T < 500.0)
     334        1617 :               _thermal_capacity[qp] = (0.013 * T - 2.5) * 1.0e6;
     335        4865 :             else if (T >= 500.0 && T < 600.0)
     336        1617 :               _thermal_capacity[qp] = (10.5 - 0.013 * T) * 1.0e6;
     337             :             else if (T >= 600.0)
     338        3248 :               _thermal_capacity[qp] = 2.7 * 1.0e6;
     339             : 
     340       12782 :             if (T < 20.0)
     341         161 :               _thermal_conductivity[qp] = 1.4875;
     342       12621 :             else if (T >= 20.0 && T < 800.0)
     343       12586 :               _thermal_conductivity[qp] = -0.000625 * T + 1.5;
     344             :             else if (T >= 800.0)
     345          35 :               _thermal_conductivity[qp] = 1.0;
     346             :             break;
     347             : 
     348       12782 :           case 1: // carbonate aggregate
     349       12782 :             if (T < 400.0)
     350        6153 :               _thermal_capacity[qp] = 2.566 * 1.0e6;
     351        6629 :             else if (T >= 400.0 && T < 410.0)
     352         168 :               _thermal_capacity[qp] = (0.1765 * T - 68.034) * 1.0e6;
     353        6461 :             else if (T >= 410.0 && T < 445.0)
     354         567 :               _thermal_capacity[qp] = (25.00671 - 0.05043 * T) * 1.0e6;
     355        5894 :             else if (T >= 445.0 && T < 500.0)
     356         924 :               _thermal_capacity[qp] = 2.566 * 1.0e6;
     357        4970 :             else if (T >= 500.0 && T < 635.0)
     358        2226 :               _thermal_capacity[qp] = (0.01603 * T - 5.44881) * 1.0e6;
     359        2744 :             else if (T >= 635.0 && T < 715.0)
     360        1323 :               _thermal_capacity[qp] = (0.16635 * T - 100.90225) * 1.0e6;
     361        1421 :             else if (T >= 715.0 && T < 785.0)
     362        1155 :               _thermal_capacity[qp] = (176.07343 - 0.22103 * T) * 1.0e6;
     363             :             else if (T >= 785.0)
     364         266 :               _thermal_capacity[qp] = 2.566 * 1.0e6;
     365             : 
     366       12782 :             if (T < 293.0)
     367        4389 :               _thermal_conductivity[qp] = 1.355;
     368             :             else
     369        8393 :               _thermal_conductivity[qp] = -0.001241 * T + 1.7162;
     370             :             break;
     371             : 
     372           0 :           default:
     373           0 :             mooseError("Unknown aggregate types");
     374             :             break;
     375             :         }
     376             :         break;
     377             : 
     378     1781146 :       case 2: // KODUR-2004  for high strength concrere
     379     1781146 :         switch (_aggregate_type)
     380             :         {
     381     1767362 :           case 0: // siliceous aggreagte
     382     1767362 :             if (T < 20.0)
     383        3566 :               _thermal_capacity[qp] = 1.8 * 1.0e6;
     384     1763796 :             else if (T >= 20.0 && T < 200.0)
     385     1662431 :               _thermal_capacity[qp] = (0.005 * T + 1.7) * 1.0e6;
     386      101365 :             else if (T >= 200.0 && T < 400.0)
     387       46425 :               _thermal_capacity[qp] = 2.7 * 1.0e6;
     388       54940 :             else if (T >= 400.0 && T < 500.0)
     389       23217 :               _thermal_capacity[qp] = (0.013 * T - 2.5) * 1.0e6;
     390       31723 :             else if (T >= 500.0 && T < 600.0)
     391       23229 :               _thermal_capacity[qp] = (10.5 - 0.013 * T) * 1.0e6;
     392        8494 :             else if (T >= 600.0 && T < 635.0)
     393        8106 :               _thermal_capacity[qp] = 2.7 * 1.0e6;
     394         388 :             else if (T > 635.0)
     395           3 :               mooseError("Temperature outside of the range for the KODUR-2004 thermal model");
     396             : 
     397     1767359 :             if (T < 20.0)
     398        3566 :               _thermal_conductivity[qp] = 1.4875;
     399     1763793 :             else if (T >= 20.0)
     400     1763793 :               _thermal_conductivity[qp] = -0.000625 * T + 1.5;
     401             :             break;
     402             : 
     403       13784 :           case 1: // carbonate aggregate
     404       13784 :             if (T < 400.0)
     405        5280 :               _thermal_capacity[qp] = 2.45 * 1.0e6;
     406        8504 :             else if (T >= 400.0 && T < 475.0)
     407        1059 :               _thermal_capacity[qp] = (0.026 * T - 12.85) * 1.0e6;
     408        7445 :             else if (T >= 475.0 && T < 650.0)
     409        2469 :               _thermal_capacity[qp] = (0.0143 * T - 6.295) * 1.0e6;
     410        4976 :             else if (T >= 650.0 && T < 735.0)
     411        1203 :               _thermal_capacity[qp] = (0.1894 * T - 120.11) * 1.0e6;
     412        3773 :             else if (T >= 735.0 && T < 800.0)
     413         924 :               _thermal_capacity[qp] = (-0.263 * T + 212.4) * 1.0e6;
     414        2849 :             else if (T >= 800.0 && T <= 1000.0)
     415        2846 :               _thermal_capacity[qp] = 2.00 * 1.0e6;
     416             :             else if (T > 1000.0)
     417           3 :               mooseError("Temperature outside of the range for the KODUR-2004 thermal model");
     418             : 
     419       13781 :             if (T < 293.0)
     420        3765 :               _thermal_conductivity[qp] = 1.355;
     421             :             else
     422       10016 :               _thermal_conductivity[qp] = -0.001241 * T + 1.7162;
     423             :             break;
     424             : 
     425           0 :           default:
     426           0 :             mooseError("Unknown aggregate types");
     427             :             break;
     428             :         }
     429             :         break;
     430             : 
     431       13793 :       case 3: // EUROCODE-2004 for both normal ans high strength concrete
     432             :         // compute density of concrete
     433       13793 :         if (T < 115.0)
     434             :           ro = _input_density;
     435       12737 :         else if (T >= 115.0 && T < 200.0)
     436         996 :           ro = _input_density * (1.0 - 0.02 * (T - 115.0) / 85.0);
     437       11741 :         else if (T >= 200.0 && T < 400.0)
     438        2334 :           ro = _input_density * (0.98 - 0.03 * (T - 200.0) / 200.0);
     439        9407 :         else if (T >= 400.0 && T < 1200.0)
     440        9404 :           ro = _input_density * (0.95 - 0.07 * (T - 400.0) / 800.0);
     441             :         else if (T >= 1200.0)
     442           3 :           mooseError("Temperature outside of the range for the EUROCODE-2004 thermal model");
     443             : 
     444       13790 :         if (T < 100.0)
     445             :           Cv = 900.0;
     446       12911 :         else if (T >= 100.0 && T < 200.0)
     447        1173 :           Cv = 900.0 + (T - 100.0);
     448       11738 :         else if (T >= 200.0 && T < 400.0)
     449        2334 :           Cv = 1000.0 + (T - 200.0) / 2.0;
     450             :         else if (T >= 400.0 && T < 1200.0)
     451             :           Cv = 1100.0;
     452             : 
     453       13790 :         _thermal_capacity[qp] = ro * Cv;
     454             : 
     455       13790 :         if (T < 20.0)
     456           6 :           _thermal_conductivity[qp] = 1.642218;
     457       13784 :         else if (T >= 20.0 && T <= 1200.0)
     458             :         {
     459       13784 :           const Real k_up = 2.0 - 0.2451 * (T / 100.0) + 0.0107 * std::pow(T / 100.0, 2.0);
     460       13784 :           const Real k_low = 1.36 - 0.136 * (T / 100.0) + 0.0057 * std::pow(T / 100.0, 2.0);
     461       13784 :           _thermal_conductivity[qp] = (k_up + k_low) / 2.0; // average bewteen upper and lower
     462             :                                                             // bounds
     463             :         }
     464             :         break;
     465             : 
     466           0 :       default:
     467           0 :         mooseError("Unknown thermal model");
     468             :         break;
     469             :     }
     470             : 
     471             :     // compute moisture diffusivity
     472     2173006 :     switch (_moisture_model)
     473             :     {
     474      378082 :       case 0: // Bazant
     475             :       {
     476      756164 :         if (_pars.isParamSetByUser("moisture_model") && T < 25.0)
     477           3 :           mooseError("Temperature outside of the range for the Bazant moisture model");
     478             :         // adsorption heat of water vapor
     479             :         Real adsorption_heat_water =
     480             :             60 * 1000 / 0.018; // an average value (60 kJ/mol) estimated for different cement paste
     481             :                                // by Poyet and Charles (2009)
     482             :         Real density_water = 1000;       // kg/m3
     483             :         Real heat_capacity_water = 4180; // J/(kg-C)
     484      378079 :         _ca[qp] = adsorption_heat_water;
     485      378079 :         _cw[qp] = density_water * heat_capacity_water;
     486             : 
     487      378079 :         if (T <= 95.0)
     488             :         {
     489      255196 :           Real alfa_T = 0.05 + 0.95 / 70 * (T - 25); // Bazant and Thonguthai 1979
     490             :           Real f1_h =
     491      255196 :               alfa_T + (1 - alfa_T) / (1.0 + std::pow(((1.0 - H) / (1 - _Hc)),
     492      255196 :                                                       _n_power)); // Bazant and Thonguthai 1979
     493      255196 :           Real f2_T = std::exp(
     494      255196 :               2700.0 * (1.0 / (25.0 + 273.15) - 1.0 / (T + 273.15))); // Bazant and Thonguthai 1979
     495      255196 :           _Dh[qp] = _D1 * f1_h * f2_T;
     496             :         }
     497             :         else
     498             :         {
     499             :           Real f2_95 = std::exp(
     500             :               2700.0 * (1.0 / (25.0 + 273.15) - 1.0 / (95 + 273.15))); // Bazant and Thonguthai 1979
     501             :           Real f3_T =
     502      122883 :               std::exp((T - 95.0) / (0.881 + 0.214 * (T - 95.0))); // Bazant and Thonguthai 1979
     503      122883 :           _Dh[qp] = _D1 * f2_95 * f3_T;                            // Bazant and Thonguthai 1979
     504             :         }
     505             :         // compute the coupled mositure diffusivity due to thermal gradient
     506      378079 :         _Dht[qp] = _alfa_Dht * _Dh[qp];
     507      378079 :         break;
     508             :       }
     509             : 
     510      854348 :       case 1: // Mensi
     511             :       {
     512      854348 :         Real initial_water_content = _water_to_cement * _cement_mass; // kg/m3
     513      854348 :         _Dh[qp] = _A * std::exp(_B * initial_water_content);
     514      854348 :         _ca[qp] = 0.;
     515      854348 :         _cw[qp] = 0.;
     516      854348 :         _Dht[qp] = 0.;
     517      854348 :         break;
     518             :       }
     519             : 
     520      940576 :       case 2: // Xi
     521             :       {
     522             :         // compute equivalent concrete age
     523      940576 :         _eqv_age[qp] =
     524      940576 :             _eqv_age_old[qp] + _dt / 86400.0 * 1.0 / (1.0 + std::pow((7.5 - 7.5 * H), 4.0));
     525             : 
     526      940576 :         Real C = std::exp(855.0 / (T + 273.15));
     527             :         Real N_ct = 1.1;
     528             :         switch (_cement_type)
     529             :         {
     530             :           case 0: // cement_type = 1
     531             :             N_ct = 1.1;
     532             :             break;
     533             :           case 1: // cement_type = 2
     534             :             N_ct = 1.0;
     535             :             break;
     536             :           case 2: // cement_type = 3
     537             :             N_ct = 1.15;
     538             :             break;
     539             :           case 3: // cement_type = 4
     540             :             N_ct = 1.5;
     541             :             break;
     542           0 :           default: // cement_type = Unknown
     543           0 :             mooseError("Unknown cement type in mositure capacity calculations");
     544             :             break;
     545             :         }
     546             : 
     547             :         Real N_wc = 0.9;
     548      940576 :         if (_water_to_cement < 0.3)
     549             :           N_wc = 0.99;
     550      940576 :         else if (_water_to_cement >= 0.3 && _water_to_cement <= 0.7)
     551      940576 :           N_wc = 0.33 + 2.2 * _water_to_cement;
     552             :         else
     553             :           N_wc = 1.87;
     554             : 
     555             :         Real N_te = 5.5;
     556      940576 :         if (_eqv_age[qp] >= 5)
     557      940576 :           N_te = 2.5 + 15.0 / _eqv_age[qp];
     558             : 
     559      940576 :         Real n = N_te * N_wc * N_ct * 1.0;
     560             : 
     561      940576 :         Real k = ((1.0 - 1.0 / n) * C - 1.0) / (C - 1.0);
     562      940576 :         if (k < 0.0)
     563             :           k = 0.0;
     564      940576 :         else if (k > 1.0)
     565             :           k = 1.0;
     566             : 
     567             :         Real V_ct = 0.9;
     568      940576 :         switch (_cement_type)
     569             :         {
     570             :           case 0: // cement_type = 1
     571             :             V_ct = 0.9;
     572             :             break;
     573             :           case 1: // cement_type = 2
     574             :             V_ct = 1.0;
     575             :             break;
     576             :           case 2: // cement_type = 3
     577             :             V_ct = 0.85;
     578             :             break;
     579             :           case 3: // cement_type = 4
     580             :             V_ct = 0.6;
     581             :             break;
     582             :           default: // cement_type = Unknown
     583             :             mooseError("Unknown cement type in mositure capacity calculations");
     584             :             break;
     585             :         }
     586             : 
     587             :         Real V_wc = 0.985;
     588      940576 :         if (_water_to_cement < 0.3)
     589             :           V_wc = 0.985;
     590      940576 :         else if (_water_to_cement >= 0.3 && _water_to_cement <= 0.7)
     591      940576 :           V_wc = 0.85 + 0.45 * _water_to_cement;
     592             :         else
     593             :           V_wc = 1.165;
     594             : 
     595             :         Real V_te = 0.024;
     596      940576 :         if (_eqv_age[qp] >= 5)
     597      940576 :           V_te = 0.068 - 0.22 / _eqv_age[qp];
     598             : 
     599             :         Real monolayer_factor = 1.0;
     600      940576 :         Real Vm = V_te * V_wc * V_ct *
     601             :                   monolayer_factor; // here 1.0 is a factor is to account for the influence of
     602             :                                     // temperature in the calculation of monolayer capacity.
     603             : 
     604      940576 :         Real W_cement = C * k * Vm * H / (1.0 - k * H) / (1.0 + (C - 1.0) * k * H);
     605             : 
     606      940576 :         Real dWdH_cement = (C * k * Vm + W_cement * k * (1.0 + (C - 1.0) * k * H) -
     607      940576 :                             W_cement * k * (1.0 - k * H) * (C - 1.0)) /
     608             :                            (1.0 - k * H) / (1.0 + (C - 1.0) * k * H);
     609             : 
     610             :         // compute mositure capacity dw/dH for aggregates
     611             :         Real n_agg = 1.5;
     612      940576 :         switch (_aggregate_pore_type)
     613             :         {
     614             :           case 0: // aggregate_pore_type = dense
     615             :             n_agg = 1.5;
     616             :             break;
     617       51128 :           case 1: // aggregate_pore_type = porous
     618             :             n_agg = 2.0;
     619       51128 :             break;
     620           0 :           default:
     621           0 :             mooseError("Unknown aggregate pore structure");
     622             :             break;
     623             :         }
     624             : 
     625      940576 :         n = 4.063 * n_agg;
     626      940576 :         k = ((1.0 - 1.0 / n) * C - 1.0) / (C - 1.0);
     627      940576 :         if (k < 0.0)
     628             :           k = 0.0;
     629      940576 :         else if (k > 1.0)
     630             :           k = 1.0;
     631             : 
     632             :         Real V_agg = 0.05;
     633      940576 :         switch (_aggregate_pore_type)
     634             :         {
     635             :           case 0: // aggregate_pore_type = dense
     636             :             V_agg = 0.05;
     637             :             break;
     638       51128 :           case 1: // aggregate_pore_type = porous
     639             :             V_agg = 0.10;
     640       51128 :             break;
     641             :           default:
     642             :             mooseError("Unknown aggregate pore structure");
     643             :             break;
     644             :         }
     645             : 
     646      940576 :         Vm = 0.0647 * V_agg;
     647             : 
     648      940576 :         Real W_agg = C * k * Vm * H / (1.0 - k * H) / (1.0 + (C - 1.0) * k * H);
     649      940576 :         Real dWdH_agg = (C * k * Vm + W_agg * k * (1.0 + (C - 1.0) * k * H) -
     650      940576 :                          W_agg * k * (1.0 - k * H) * (C - 1.0)) /
     651             :                         (1.0 - k * H) / (1.0 + (C - 1.0) * k * H);
     652             : 
     653             :         // compute weight percentages of agrregates and cement paste
     654      940576 :         Real _f_agg = _aggregate_mass / (_aggregate_mass + _cement_mass);
     655      940576 :         Real _f_cp = _cement_mass / (_aggregate_mass + _cement_mass);
     656             : 
     657             :         // compute combined dW/dH of concrete
     658      940576 :         (*_moisture_capacity)[qp] = (_f_agg * dWdH_agg + _f_cp * dWdH_cement);
     659             : 
     660             :         // moisture diffusivity calculations
     661      940576 :         Real gi = _agg_vol_fraction;
     662      940576 :         Real wc = _water_to_cement;
     663      940576 :         Real alfa_h = 1.05 - 3.8 * wc + 3.56 * std::pow(wc, 2.0);    // cm2/day
     664      940576 :         Real betta_h = -14.4 + 50.4 * wc - 41.8 * std::pow(wc, 2.0); // cm2/day
     665      940576 :         Real gamma_h = 31.3 - 136.0 * wc + 162.0 * std::pow(wc, 2.0);
     666      940576 :         Real power1 = std::pow(10.0, gamma_h * (H - 1));
     667      940576 :         Real power2 = std::pow(2.0, -1.0 * power1);
     668             : 
     669      940576 :         Real Dhcp = alfa_h + betta_h * (1.0 - power2);  // cm2/day
     670      940576 :         _Dh[qp] = Dhcp * (1 + gi / ((1 - gi) / 3 - 1)); // cm2/day
     671      940576 :         _Dh[qp] = _Dh[qp] * 1e-4 / 86400;               // m2/s
     672             : 
     673      940576 :         _ca[qp] = 0.;
     674      940576 :         _cw[qp] = 0.;
     675      940576 :         _Dht[qp] = 0.;
     676      940576 :         break;
     677             :       }
     678             : 
     679           0 :       default:
     680             :       {
     681           0 :         mooseError("Unknown moisture diffusivity model");
     682             :         break;
     683             :       }
     684             :     }
     685             :   }
     686     1105451 : }

Generated by: LCOV version 1.14