55#ifndef BELFEM_POWERLAWS_HPP
56#define BELFEM_POWERLAWS_HPP
69 real d = b * b + a * c ;
74 "Piecewise power law: Bezier discriminant %g below the roundoff band", (
double ) d ) ;
76 return std::sqrt( d < 0.0 ? 0.0 : d ) ;
111 return std::max( this->
n_eval_raw( T, normB, angleNxB ), 1.0 ) ;
133 if ( ! ( this->
n_eval_raw( T, normB, angleNxB ) > 1.0 ) )
return 0.0 ;
157 if ( ! ( this->
n_eval_raw( T, normB, angleNxB ) > 1.0 ) )
return 0.0 ;
212 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
214 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
233 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
235 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
261 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
263 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
288 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
290 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
309 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
311 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
324 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
328 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
330 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
350 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
352 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
367 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
369 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
446 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
447 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
450 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
453 real j1 =
jc * std::pow(10.0,2.5/
n) ;
454 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
462 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
471 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
475 real logj1 = std::log10(j1) ;
476 real logj2 = std::log10(j2) ;
478 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
479 real b = logj1 - logj2 ;
480 real c = std::log10(normJ) - logj1 ;
483 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
484 (
double ) std::abs( a ), mLabel.c_str() ) ;
488 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
515 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
516 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
519 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
522 real j1 =
jc * std::pow(10.0,2.5/
n) ;
523 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
531 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
540 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
544 real logj1 = std::log10(j1) ;
545 real logj2 = std::log10(j2) ;
547 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
548 real b = logj1 - logj2 ;
549 real c = std::log10(normJ) - logj1 ;
552 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
553 (
double ) std::abs( a ), mLabel.c_str() ) ;
557 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
590 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
591 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
594 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
597 real j1 =
jc * std::pow(10.0,2.5/
n) ;
598 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
606 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
615 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
619 real logj1 = std::log10(j1) ;
620 real logj2 = std::log10(j2) ;
622 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
623 real b = logj1 - logj2 ;
624 real c = std::log10(normJ) - logj1 ;
627 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
628 (
double ) std::abs( a ), mLabel.c_str() ) ;
632 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
665 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
666 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
669 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
672 real j1 =
jc * std::pow(10.0,2.5/
n) ;
673 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
681 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
690 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
694 real logj1 = std::log10(j1) ;
695 real logj2 = std::log10(j2) ;
697 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
698 real b = logj1 - logj2 ;
699 real c = std::log10(normJ) - logj1 ;
702 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
703 (
double ) std::abs( a ), mLabel.c_str() ) ;
707 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
733 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
734 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
737 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
740 real j1 =
jc * std::pow(10.0,2.5/
n) ;
741 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
749 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
758 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
762 real logj1 = std::log10(j1) ;
763 real logj2 = std::log10(j2) ;
765 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
766 real b = logj1 - logj2 ;
767 real c = std::log10(normJ) - logj1 ;
770 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
771 (
double ) std::abs( a ), mLabel.c_str() ) ;
775 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
797 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
800 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
801 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
804 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
807 real j1 =
jc * std::pow(10.0,2.5/
n) ;
808 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
816 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
825 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
829 real logj1 = std::log10(j1) ;
830 real logj2 = std::log10(j2) ;
832 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
833 real b = logj1 - logj2 ;
834 real c = std::log10(normJ) - logj1 ;
837 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
838 (
double ) std::abs( a ), mLabel.c_str() ) ;
842 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
866 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
867 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
870 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
873 real j1 =
jc * std::pow(10.0,2.5/
n) ;
874 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
882 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
891 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
895 real logj1 = std::log10(j1) ;
896 real logj2 = std::log10(j2) ;
898 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
899 real b = logj1 - logj2 ;
900 real c = std::log10(normJ) - logj1 ;
903 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
904 (
double ) std::abs( a ), mLabel.c_str() ) ;
908 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
931 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
932 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
935 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
938 real j1 =
jc * std::pow(10.0,2.5/
n) ;
939 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
947 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
956 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
960 real logj1 = std::log10(j1) ;
961 real logj2 = std::log10(j2) ;
963 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
964 real b = logj1 - logj2 ;
965 real c = std::log10(normJ) - logj1 ;
968 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
969 (
double ) std::abs( a ), mLabel.c_str() ) ;
973 real rhoFF = std::pow(10.0,std::log10(rho1)*(1.0-tParam)*(1.0-tParam) + std::log10(rho2)*2.0*(1.0-tParam)*tParam + std::log10(rho3)*tParam*tParam );
1057 "Material %s does not have a Jc function", mLabel.c_str() ) ;
1059 return mJcFunction->
eval( B, angleNxB, T )*((this->mDefectFunction) (x,y,z,t)) ;
1071 "Material %s does not have a Jc function", mLabel.c_str() ) ;
1073 return mJcFunction->
eval( B, angleNxB )*((this->mDefectFunction) (x,y,z,t)) ;
1116 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1119 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1122 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1142 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1145 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1148 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1166 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1168 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1170 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1181 real jc = this->
jc_custom( T ) * ((this->mDefectFunction) (x,y,z,t)) ;
1187 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1189 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1191 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1204 "wrong powerlaw derivative for material %s", mLabel.c_str() ) ;
1213 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1215 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1217 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1238 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1240 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1242 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1261 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1263 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1265 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1278 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
1284 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1286 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1288 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1354 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1355 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1358 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1359 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1364 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1368 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1377 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1380 real logj1 = std::log10(j1) ;
1381 real logj2 = std::log10(j2) ;
1382 real logj3 = std::log10(j3) ;
1384 real a = logj1 - 2.0*logj2 + logj3 ;
1385 real b = logj1 - logj2 ;
1386 real c = std::log10(normJ) - logj1 ;
1389 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1390 (
double ) std::abs( a ), mLabel.c_str() ) ;
1398 real tDisc = b * b + a * c ;
1399 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1403 real tParam = ( b + tSqrt ) / a ;
1406 real dt_dc = 0.5 / tSqrt ;
1407 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1408 real dt_dJ = dt_dc * dc_dJ ;
1412 real logrho1 = std::log10(rho1) ;
1413 real logrho2 = std::log10(rho2) ;
1414 real logrho3 = std::log10(rhon) ;
1416 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1419 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1422 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1448 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1449 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1452 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1453 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1458 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1462 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1471 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1474 real logj1 = std::log10(j1) ;
1475 real logj2 = std::log10(j2) ;
1476 real logj3 = std::log10(j3) ;
1478 real a = logj1 - 2.0*logj2 + logj3 ;
1479 real b = logj1 - logj2 ;
1480 real c = std::log10(normJ) - logj1 ;
1483 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1484 (
double ) std::abs( a ), mLabel.c_str() ) ;
1487 real tDisc = b * b + a * c ;
1488 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1492 real tParam = ( b + tSqrt ) / a ;
1495 real dt_dc = 0.5 / tSqrt ;
1496 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1497 real dt_dJ = dt_dc * dc_dJ ;
1501 real logrho1 = std::log10(rho1) ;
1502 real logrho2 = std::log10(rho2) ;
1503 real logrho3 = std::log10(rhon) ;
1505 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1508 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1511 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1535 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1536 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1538 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1539 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1543 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1547 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1554 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1556 real logj1 = std::log10(j1) ;
1557 real logj2 = std::log10(j2) ;
1558 real logj3 = std::log10(j3) ;
1560 real a = logj1 - 2.0*logj2 + logj3 ;
1561 real b = logj1 - logj2 ;
1562 real c = std::log10(normJ) - logj1 ;
1565 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1566 (
double ) std::abs( a ), mLabel.c_str() ) ;
1569 real tDisc = b * b + a * c ;
1570 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1573 real tParam = ( b + tSqrt ) / a ;
1575 real dt_dc = 0.5 / tSqrt ;
1576 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1577 real dt_dJ = dt_dc * dc_dJ ;
1579 real logrho1 = std::log10(rho1) ;
1580 real logrho2 = std::log10(rhon) ;
1581 real logrho3 = std::log10(rhon) ;
1583 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1585 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1587 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1605 real jc = this->
jc_custom( T ) * ((this->mDefectFunction) (x,y,z,t)) ;
1610 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1611 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1613 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1614 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1618 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1622 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1629 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1631 real logj1 = std::log10(j1) ;
1632 real logj2 = std::log10(j2) ;
1633 real logj3 = std::log10(j3) ;
1635 real a = logj1 - 2.0*logj2 + logj3 ;
1636 real b = logj1 - logj2 ;
1637 real c = std::log10(normJ) - logj1 ;
1640 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1641 (
double ) std::abs( a ), mLabel.c_str() ) ;
1644 real tDisc = b * b + a * c ;
1645 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1648 real tParam = ( b + tSqrt ) / a ;
1650 real dt_dc = 0.5 / tSqrt ;
1651 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1652 real dt_dJ = dt_dc * dc_dJ ;
1654 real logrho1 = std::log10(rho1) ;
1655 real logrho2 = std::log10(rhon) ;
1656 real logrho3 = std::log10(rhon) ;
1658 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1660 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1662 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1675 "wrong powerlaw derivative for material %s", mLabel.c_str() ) ;
1690 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1691 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1693 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1694 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1698 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1702 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1709 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1711 real logj1 = std::log10(j1) ;
1712 real logj2 = std::log10(j2) ;
1713 real logj3 = std::log10(j3) ;
1715 real a = logj1 - 2.0*logj2 + logj3 ;
1716 real b = logj1 - logj2 ;
1717 real c = std::log10(normJ) - logj1 ;
1720 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1721 (
double ) std::abs( a ), mLabel.c_str() ) ;
1724 real tDisc = b * b + a * c ;
1725 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1728 real tParam = ( b + tSqrt ) / a ;
1730 real dt_dc = 0.5 / tSqrt ;
1731 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1732 real dt_dJ = dt_dc * dc_dJ ;
1734 real logrho1 = std::log10(rho1) ;
1735 real logrho2 = std::log10(rhon) ;
1736 real logrho3 = std::log10(rhon) ;
1738 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1740 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1742 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1769 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1770 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1772 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1773 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1777 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1781 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1788 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1790 real logj1 = std::log10(j1) ;
1791 real logj2 = std::log10(j2) ;
1792 real logj3 = std::log10(j3) ;
1794 real a = logj1 - 2.0*logj2 + logj3 ;
1795 real b = logj1 - logj2 ;
1796 real c = std::log10(normJ) - logj1 ;
1799 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1800 (
double ) std::abs( a ), mLabel.c_str() ) ;
1803 real tDisc = b * b + a * c ;
1804 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1807 real tParam = ( b + tSqrt ) / a ;
1809 real dt_dc = 0.5 / tSqrt ;
1810 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1811 real dt_dJ = dt_dc * dc_dJ ;
1813 real logrho1 = std::log10(rho1) ;
1814 real logrho2 = std::log10(rhon) ;
1815 real logrho3 = std::log10(rhon) ;
1817 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1819 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1821 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1846 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1847 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1849 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1850 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1854 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1858 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1865 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1867 real logj1 = std::log10(j1) ;
1868 real logj2 = std::log10(j2) ;
1869 real logj3 = std::log10(j3) ;
1871 real a = logj1 - 2.0*logj2 + logj3 ;
1872 real b = logj1 - logj2 ;
1873 real c = std::log10(normJ) - logj1 ;
1876 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1877 (
double ) std::abs( a ), mLabel.c_str() ) ;
1880 real tDisc = b * b + a * c ;
1881 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1884 real tParam = ( b + tSqrt ) / a ;
1886 real dt_dc = 0.5 / tSqrt ;
1887 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1888 real dt_dJ = dt_dc * dc_dJ ;
1890 real logrho1 = std::log10(rho1) ;
1891 real logrho2 = std::log10(rhon) ;
1892 real logrho3 = std::log10(rhon) ;
1894 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1896 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1898 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1918 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
1923 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1924 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1926 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1927 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1931 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1935 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1942 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1944 real logj1 = std::log10(j1) ;
1945 real logj2 = std::log10(j2) ;
1946 real logj3 = std::log10(j3) ;
1948 real a = logj1 - 2.0*logj2 + logj3 ;
1949 real b = logj1 - logj2 ;
1950 real c = std::log10(normJ) - logj1 ;
1953 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1954 (
double ) std::abs( a ), mLabel.c_str() ) ;
1957 real tDisc = b * b + a * c ;
1958 if ( ! ( tDisc >
BELFEM_EPSILON * ( b * b + 1.0 ) ) )
return mNff * rhon / normJ ;
1961 real tParam = ( b + tSqrt ) / a ;
1963 real dt_dc = 0.5 / tSqrt ;
1964 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1965 real dt_dJ = dt_dc * dc_dJ ;
1967 real logrho1 = std::log10(rho1) ;
1968 real logrho2 = std::log10(rhon) ;
1969 real logrho3 = std::log10(rhon) ;
1971 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1973 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1975 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
2014 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2017 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2020 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2022 real dp0dB = p0 * ( -(
n /
jc ) * djcdB
2023 + std::log( normJ /
jc ) * dndB ) ;
2025 return dp0dB / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 ) ;
2037 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2044 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2047 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2049 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2051 real dp0dB = p0 * ( -(
n /
jc ) * djcdB
2052 + std::log( normJ /
jc ) * dndB ) ;
2054 return dp0dB / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 ) ;
2075 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2079 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2080 if ( normJ > j1 )
return 0.0 ;
2084 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2086 return p0 * ( -(
n /
jc ) * djcdB
2087 + std::log( normJ /
jc ) * dndB ) ;
2102 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2109 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2111 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2112 if ( normJ > j1 )
return 0.0 ;
2114 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2116 return p0 * ( -(
n /
jc ) * djcdB
2117 + std::log( normJ /
jc ) * dndB ) ;
2166 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2169 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2171 real dp0dT = p0 * ( -(
n /
jc ) * djcdT
2172 + std::log( normJ /
jc ) * dndT ) ;
2174 return dp0dT / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 )
2175 + dadT * std::pow( rhoPL / ( rhon + rhoPL ), 2.0 ) ;
2187 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2197 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2199 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2201 real dp0dT = p0 * ( -(
n /
jc ) * djcdT
2202 + std::log( normJ /
jc ) * dndT ) ;
2204 return dp0dT / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 )
2205 + dadT * std::pow( rhoPL / ( rhon + rhoPL ), 2.0 ) ;
2230 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2235 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2237 return p0 * ( -(
n /
jc ) * djcdT
2238 + std::log( normJ /
jc ) * dndT ) ;
2242 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin ) ;
2245 real j3 = j1 * std::pow( rhon / rho1, 1.0 / ( mNff ) ) ;
2258 real j2 = j1 * std::pow( rhon / rho1, 1.0 / (
n - 1.0 ) ) ;
2260 real logj1 = std::log10( j1 ) ;
2261 real logj2 = std::log10( j2 ) ;
2263 real a = logj1 - 2.0 * logj2 + std::log10( j3 ) ;
2264 real b = logj1 - logj2 ;
2265 real c = std::log10( normJ ) - logj1 ;
2268 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
2269 (
double ) std::abs( a ), mLabel.c_str() ) ;
2271 real tDisc = b * b + a * c ;
2273 real tParam = ( b + tSqrt ) / a ;
2275 real rhoFF = std::pow( 10.0,
2276 std::log10( rho1 ) * ( 1.0 - tParam ) * ( 1.0 - tParam )
2277 + std::log10( rhon ) * 2.0 * ( 1.0 - tParam ) * tParam
2278 + std::log10( rhon ) * tParam * tParam ) ;
2281 real dlnrho1dT = -djcdT /
jc + 2.5 * std::log( 10.0 ) / (
n *
n ) * dndT ;
2283 real tFrozen = rhoFF * ( ( 2.0 * tParam - tParam * tParam ) * dadT / rhon
2284 + ( 1.0 - tParam ) * ( 1.0 - tParam ) * dlnrho1dT ) ;
2297 real dlnj1dT = -dlnrho1dT ;
2298 real dlnrhondT = dadT / rhon ;
2299 real dlnj3dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / mNff ;
2300 real dlnj2dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / (
n - 1.0 )
2301 - dndT / ( (
n - 1.0 ) * (
n - 1.0 ) )
2302 * std::log( rhon / rho1 ) ;
2305 real tInvLn10 = 1.0 / std::log( 10.0 ) ;
2306 real dA = ( dlnj1dT - 2.0 * dlnj2dT + dlnj3dT ) * tInvLn10 ;
2307 real dB = ( dlnj1dT - dlnj2dT ) * tInvLn10 ;
2308 real dC = -dlnj1dT * tInvLn10 ;
2345 real dSdT = ( 2.0 * b * dB + dA * c + a * dC ) / ( 2.0 * tSqrt ) ;
2346 real dtdT = ( ( dB + dSdT ) - tParam * dA ) / a ;
2352 + rhoFF * 2.0 * ( 1.0 - tParam ) * std::log( rhon / rho1 ) * dtdT ;
2369 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2376 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2381 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2383 return p0 * ( -(
n /
jc ) * djcdT
2384 + std::log( normJ /
jc ) * dndT ) ;
2388 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin ) ;
2390 real j3 = j1 * std::pow( rhon / rho1, 1.0 / ( mNff ) ) ;
2396 real j2 = j1 * std::pow( rhon / rho1, 1.0 / (
n - 1.0 ) ) ;
2398 real logj1 = std::log10( j1 ) ;
2399 real logj2 = std::log10( j2 ) ;
2401 real a = logj1 - 2.0 * logj2 + std::log10( j3 ) ;
2402 real b = logj1 - logj2 ;
2403 real c = std::log10( normJ ) - logj1 ;
2406 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
2407 (
double ) std::abs( a ), mLabel.c_str() ) ;
2409 real tDisc = b * b + a * c ;
2411 real tParam = ( b + tSqrt ) / a ;
2413 real rhoFF = std::pow( 10.0,
2414 std::log10( rho1 ) * ( 1.0 - tParam ) * ( 1.0 - tParam )
2415 + std::log10( rhon ) * 2.0 * ( 1.0 - tParam ) * tParam
2416 + std::log10( rhon ) * tParam * tParam ) ;
2419 real dlnrho1dT = -djcdT /
jc + 2.5 * std::log( 10.0 ) / (
n *
n ) * dndT ;
2421 real tFrozen = rhoFF * ( ( 2.0 * tParam - tParam * tParam ) * dadT / rhon
2422 + ( 1.0 - tParam ) * ( 1.0 - tParam ) * dlnrho1dT ) ;
2435 real dlnj1dT = -dlnrho1dT ;
2436 real dlnrhondT = dadT / rhon ;
2437 real dlnj3dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / mNff ;
2438 real dlnj2dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / (
n - 1.0 )
2439 - dndT / ( (
n - 1.0 ) * (
n - 1.0 ) )
2440 * std::log( rhon / rho1 ) ;
2443 real tInvLn10 = 1.0 / std::log( 10.0 ) ;
2444 real dA = ( dlnj1dT - 2.0 * dlnj2dT + dlnj3dT ) * tInvLn10 ;
2445 real dB = ( dlnj1dT - dlnj2dT ) * tInvLn10 ;
2446 real dC = -dlnj1dT * tInvLn10 ;
2483 real dSdT = ( 2.0 * b * dB + dA * c + a * dC ) / ( 2.0 * tSqrt ) ;
2484 real dtdT = ( ( dB + dSdT ) - tParam * dA ) / a ;
2490 + rhoFF * 2.0 * ( 1.0 - tParam ) * std::log( rhon / rho1 ) * dtdT ;
2528 return std::isfinite( rhoPL ) && rhoPL >= 0.0 ;
2537 + (
n - 1.0 ) * std::log10( normJ /
jc ) ;
2544 if ( ! ( lg <= 250.0 ) )
2548 rhoPL = std::max( std::pow( 10.0, lg ), mRhoMin ) ;
2567 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
2579 return rhoPL > rhon ? rhon / ( 1.0 + rhon / rhoPL )
2580 : rhoPL / ( 1.0 + rhoPL / rhon ) ;
2596 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2597 if (
n <= 1.0 )
return 0.0 ;
2607 real w = rhon / ( rhoPL + rhon ) ;
2611 return ( w * rhoPL ) * ( w * (
n - 1.0 ) / normJ ) ;
2626 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2636 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2645 real w = rhon / ( rhoPL + rhon ) ;
2652 return ( w * rhoPL ) * ( w * ( -(
n * ( djcdB /
jc ) )
2654 : std::log( normJ ) - std::log(
jc ) ) * dndB ) ) ;
2672 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return dadT ;
2684 real w = rhon / ( rhoPL + rhon ) ;
2685 real v = rhoPL / ( rhoPL + rhon ) ;
2692 real dlnp = ( normJ < BELFEM_EPSILON && n > 1.0 ) ? 0.0 :
2693 -(
n * ( djcdT /
jc ) )
2695 : std::log( normJ ) - std::log(
jc ) ) * dndT ;
2697 return ( w * rhoPL ) * ( w * dlnp ) + v * v * dadT ;
2712 real jc = this->
jc_eval( T, normB, angleNxB ) * ( ( this->mDefectFunction )( x, y, z, t ) ) ;
2715 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
2726 return rhoPL > rhon ? rhon / ( 1.0 + rhon / rhoPL )
2727 : rhoPL / ( 1.0 + rhoPL / rhon ) ;
2740 real jc = this->
jc_eval( T, normB, angleNxB ) * ( ( this->mDefectFunction )( x, y, z, t ) ) ;
2743 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2744 if (
n <= 1.0 )
return 0.0 ;
2754 real w = rhon / ( rhoPL + rhon ) ;
2758 return ( w * rhoPL ) * ( w * (
n - 1.0 ) / normJ ) ;
2771 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2775 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2784 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2793 real w = rhon / ( rhoPL + rhon ) ;
2798 return ( w * rhoPL ) * ( w * ( -(
n * ( djcdB /
jc ) )
2800 : std::log( normJ ) - std::log(
jc ) ) * dndB ) ) ;
2815 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2819 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return dadT ;
2832 real w = rhon / ( rhoPL + rhon ) ;
2833 real v = rhoPL / ( rhoPL + rhon ) ;
2837 real dlnp = ( normJ < BELFEM_EPSILON && n > 1.0 ) ? 0.0 :
2838 -(
n * ( djcdT /
jc ) )
2840 : std::log( normJ ) - std::log(
jc ) ) * dndT ;
2842 return ( w * rhoPL ) * ( w * dlnp ) + v * v * dadT ;
#define BELFEM_ERROR(aCheck,...)
Definition assert.hpp:264
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
bool is_constant(const MaterialProperty aProperty) const
Definition cl_Material.hpp:1677
real rho_powerlaw(const real normJ) const
Power law resistivity for HTS (constant jc and n).
Definition powerlaws.hpp:202
virtual real rho(const real T) const
Electrical resistivity (isotropic).
Definition cl_Material.hpp:1931
virtual real jc_custom(const real T) const
Definition cl_Material.cpp:581
real n(const real normB, const real angleNxB, const real T) const
Direct evaluation of the n-value as a function of , and .
Definition powerlaws.hpp:992
real n_eval_raw(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:94
real drho_riva_dB(const real normJ, const real T, const real normB, const real angleNxB) const
dρ/d|B| of rho_riva: w²·dρ_PL/dB ( dρ_n/dB = 0 on this path )
Definition powerlaws.hpp:2615
const material::JcFunction * mJcFunction
Definition cl_Material.hpp:404
virtual real drhodT(const real T) const
Definition cl_Material.hpp:1941
real drho_piecewise_dT(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of piecewise resistivity with respect to T at fixed J, |B|, θ ( T-leg ).
Definition powerlaws.hpp:2209
real jc_eval(const real T, const real normB, const real angleNxB) const
O1 "full-signature policy" helpers: the assembly path always passes the full ( T, normB,...
Definition powerlaws.hpp:84
real drho_piecewise_dB(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of piecewise resistivity with respect to |B| at fixed J, T, θ
Definition powerlaws.hpp:2058
real drho_piecewise_dJ(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of piecewise resistivity with respect to current density magnitude.
Definition powerlaws.hpp:1830
real drho_riva_dJ(const real normJ, const real T, const real normB, const real angleNxB) const
dρ/d|J| of rho_riva: w²·dρ_PL/dJ with w = ρ_n/(ρ_PL+ρ_n)
Definition powerlaws.hpp:2584
real dn_eval_dB(const real T, const real normB, const real angleNxB) const
d(n)/d|B|, same routing as djc_eval_dB
Definition powerlaws.hpp:128
real drho_powerlaw_dB(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of power-law resistivity with respect to |B| at fixed J, T, θ ( jc = jc(T,...
Definition powerlaws.hpp:2002
static real piecewise_bezier_sqrt(const real a, const real b, const real c)
Definition powerlaws.hpp:67
real rho_piecewise(const real normJ) const
Piecewise resistivity for HTS (constant jc and n).
Definition powerlaws.hpp:430
real djc_eval_dB(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:120
bool riva_rho_pl(const real normJ, const real jc, const real n, const real ec, real &rhoPL) const
Definition powerlaws.hpp:2519
real n_eval(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:104
real jc(const real normB, const real angleNxB, const real T) const
Direct evaluation of the critical current density .
Definition powerlaws.hpp:1023
real djc_eval_dT(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:144
real dn_eval_dT(const real T, const real normB, const real angleNxB) const
d(n)/dT, same routing as djc_eval_dT
Definition powerlaws.hpp:152
real drho_powerlaw_dT(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of power-law resistivity with respect to T at fixed J, |B|, θ ( T-leg: jc(T),...
Definition powerlaws.hpp:2151
real constant_property(const MaterialProperty aProperty) const
Definition cl_Material.hpp:1683
const material::JcFunction * mNFunction
Definition cl_Material.hpp:405
real drho_riva_dT(const real normJ, const real T, const real normB, const real angleNxB) const
dρ/dT of rho_riva: w²·dρ_PL/dT + (1−w)²·dρ_n/dT
Definition powerlaws.hpp:2658
real drho_powerlaw_dJ(const real normJ, const real T, const real normB, const real angleNxB) const
Derivative of power-law resistivity with respect to current density magnitude.
Definition powerlaws.hpp:1251
real rho_riva(const real normJ, const real T, const real normB, const real angleNxB) const
Riva-law resistivity: the superconducting power-law channel in parallel with the normal-state channel...
Definition powerlaws.hpp:2554
virtual real n_custom(const real T) const
Definition cl_Material.cpp:588
virtual real deval_dB(const real normB, const real angle, const real T) const
Derivative of eval with respect to the field magnitude.
Definition cl_JcFunction.cpp:52
virtual real eval(const real normB, const real angle) const
Evaluate with field and angle dependence.
Definition cl_JcFunction.cpp:26
bool depends_on(const JcParameter aParameter) const
Definition cl_JcFunction.hpp:262
virtual real deval_dT(const real normB, const real angle, const real T) const
Derivative of eval with respect to temperature.
Definition cl_JcFunction.cpp:72
@ angleNxB
Definition cl_JcFunction.hpp:82
@ normB
Definition cl_JcFunction.hpp:81
@ T
Definition cl_JcFunction.hpp:83
USER GUIDES:
Definition cl_Capacitor.cpp:16
greal gTbulk
Definition globals.hpp:45
constexpr real BELFEM_EPSILON
Definition typedefs.hpp:89
@ ec
Definition cl_Material.hpp:185
@ n
Definition cl_Material.hpp:187
@ jc
Definition cl_Material.hpp:186
@ T_crit
Definition cl_Material.hpp:167
double real
Definition typedefs.hpp:36