54#ifndef BELFEM_POWERLAWS_HPP
55#define BELFEM_POWERLAWS_HPP
93 return std::max( this->
n_eval_raw( T, normB, angleNxB ), 1.0 ) ;
115 if ( ! ( this->
n_eval_raw( T, normB, angleNxB ) > 1.0 ) )
return 0.0 ;
139 if ( ! ( this->
n_eval_raw( T, normB, angleNxB ) > 1.0 ) )
return 0.0 ;
194 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
196 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
215 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
217 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
243 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
245 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
270 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
272 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
291 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
293 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
306 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
310 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
312 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
332 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
334 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
349 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
351 return 1.0/((1.0/rhon) + (1.0/rhoPL)) ;
428 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
429 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
432 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
435 real j1 =
jc * std::pow(10.0,2.5/
n) ;
436 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
444 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
453 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
457 real logj1 = std::log10(j1) ;
458 real logj2 = std::log10(j2) ;
460 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
461 real b = logj1 - logj2 ;
462 real c = std::log10(normJ) - logj1 ;
465 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
466 (
double ) std::abs( a ), mLabel.c_str() ) ;
468 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
470 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 );
497 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
498 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
501 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
504 real j1 =
jc * std::pow(10.0,2.5/
n) ;
505 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
513 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
522 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
526 real logj1 = std::log10(j1) ;
527 real logj2 = std::log10(j2) ;
529 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
530 real b = logj1 - logj2 ;
531 real c = std::log10(normJ) - logj1 ;
534 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
535 (
double ) std::abs( a ), mLabel.c_str() ) ;
537 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
539 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 );
572 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
573 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
576 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
579 real j1 =
jc * std::pow(10.0,2.5/
n) ;
580 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
588 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
597 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
601 real logj1 = std::log10(j1) ;
602 real logj2 = std::log10(j2) ;
604 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
605 real b = logj1 - logj2 ;
606 real c = std::log10(normJ) - logj1 ;
609 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
610 (
double ) std::abs( a ), mLabel.c_str() ) ;
612 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
614 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 );
647 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
648 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
651 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
654 real j1 =
jc * std::pow(10.0,2.5/
n) ;
655 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
663 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
672 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
676 real logj1 = std::log10(j1) ;
677 real logj2 = std::log10(j2) ;
679 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
680 real b = logj1 - logj2 ;
681 real c = std::log10(normJ) - logj1 ;
684 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
685 (
double ) std::abs( a ), mLabel.c_str() ) ;
687 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
689 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 );
715 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
716 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
719 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin);
722 real j1 =
jc * std::pow(10.0,2.5/
n) ;
723 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
731 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
740 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
744 real logj1 = std::log10(j1) ;
745 real logj2 = std::log10(j2) ;
747 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
748 real b = logj1 - logj2 ;
749 real c = std::log10(normJ) - logj1 ;
752 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
753 (
double ) std::abs( a ), mLabel.c_str() ) ;
755 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
757 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 );
779 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
782 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
783 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
786 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
789 real j1 =
jc * std::pow(10.0,2.5/
n) ;
790 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
798 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
807 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
811 real logj1 = std::log10(j1) ;
812 real logj2 = std::log10(j2) ;
814 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
815 real b = logj1 - logj2 ;
816 real c = std::log10(normJ) - logj1 ;
819 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
820 (
double ) std::abs( a ), mLabel.c_str() ) ;
822 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
824 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 );
848 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
849 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
852 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
855 real j1 =
jc * std::pow(10.0,2.5/
n) ;
856 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
864 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
873 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
877 real logj1 = std::log10(j1) ;
878 real logj2 = std::log10(j2) ;
880 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
881 real b = logj1 - logj2 ;
882 real c = std::log10(normJ) - logj1 ;
885 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
886 (
double ) std::abs( a ), mLabel.c_str() ) ;
888 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
890 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 );
913 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
914 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
917 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
920 real j1 =
jc * std::pow(10.0,2.5/
n) ;
921 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
929 real j3 = j1 * std::pow((rhon/rho1),1.0/(mNff)) ;
938 real j2 = j1 * std::pow((rhon/rho1),1.0/(
n-1.0)) ;
942 real logj1 = std::log10(j1) ;
943 real logj2 = std::log10(j2) ;
945 real a = logj1 - 2.0*logj2 + std::log10(j3) ;
946 real b = logj1 - logj2 ;
947 real c = std::log10(normJ) - logj1 ;
950 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
951 (
double ) std::abs( a ), mLabel.c_str() ) ;
953 real tParam = (b+std::pow(b*b+a*c,0.5))/a ;
955 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 );
979 "Material %s does not have an N function", mLabel.c_str() ) ;
992 "Material %s does not have an N function", mLabel.c_str() ) ;
1046 "Material %s does not have a Jc function", mLabel.c_str() ) ;
1048 return mJcFunction->
eval( B, angleNxB, T )*((this->mDefectFunction) (x,y,z,t)) ;
1060 "Material %s does not have a Jc function", mLabel.c_str() ) ;
1062 return mJcFunction->
eval( B, angleNxB )*((this->mDefectFunction) (x,y,z,t)) ;
1105 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1108 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1111 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1131 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1134 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1137 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1155 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1157 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1159 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1170 real jc = this->
jc_custom( T ) * ((this->mDefectFunction) (x,y,z,t)) ;
1176 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1178 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1180 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1193 "wrong powerlaw derivative for material %s", mLabel.c_str() ) ;
1202 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1204 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1206 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1227 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1229 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1231 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1250 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1252 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1254 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1267 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
1273 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1275 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1277 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1341 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1342 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1345 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1346 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1351 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1352 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1353 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1356 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1365 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1368 real logj1 = std::log10(j1) ;
1369 real logj2 = std::log10(j2) ;
1370 real logj3 = std::log10(j3) ;
1372 real a = logj1 - 2.0*logj2 + logj3 ;
1373 real b = logj1 - logj2 ;
1374 real c = std::log10(normJ) - logj1 ;
1377 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1378 (
double ) std::abs( a ), mLabel.c_str() ) ;
1381 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1384 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1385 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1386 real dt_dJ = dt_dc * dc_dJ ;
1390 real logrho1 = std::log10(rho1) ;
1391 real logrho2 = std::log10(rho2) ;
1392 real logrho3 = std::log10(rhon) ;
1394 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1397 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1400 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1426 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1427 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1430 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1431 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1436 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1437 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1438 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1441 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1450 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1453 real logj1 = std::log10(j1) ;
1454 real logj2 = std::log10(j2) ;
1455 real logj3 = std::log10(j3) ;
1457 real a = logj1 - 2.0*logj2 + logj3 ;
1458 real b = logj1 - logj2 ;
1459 real c = std::log10(normJ) - logj1 ;
1462 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1463 (
double ) std::abs( a ), mLabel.c_str() ) ;
1466 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1469 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1470 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1471 real dt_dJ = dt_dc * dc_dJ ;
1475 real logrho1 = std::log10(rho1) ;
1476 real logrho2 = std::log10(rho2) ;
1477 real logrho3 = std::log10(rhon) ;
1479 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1482 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1485 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1509 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1510 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1512 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1513 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1517 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1518 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1519 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1522 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1529 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1531 real logj1 = std::log10(j1) ;
1532 real logj2 = std::log10(j2) ;
1533 real logj3 = std::log10(j3) ;
1535 real a = logj1 - 2.0*logj2 + logj3 ;
1536 real b = logj1 - logj2 ;
1537 real c = std::log10(normJ) - logj1 ;
1540 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1541 (
double ) std::abs( a ), mLabel.c_str() ) ;
1543 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1545 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1546 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1547 real dt_dJ = dt_dc * dc_dJ ;
1549 real logrho1 = std::log10(rho1) ;
1550 real logrho2 = std::log10(rhon) ;
1551 real logrho3 = std::log10(rhon) ;
1553 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1555 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1557 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1575 real jc = this->
jc_custom( T ) * ((this->mDefectFunction) (x,y,z,t)) ;
1580 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1581 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1583 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1584 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1588 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1589 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1590 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1593 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1600 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1602 real logj1 = std::log10(j1) ;
1603 real logj2 = std::log10(j2) ;
1604 real logj3 = std::log10(j3) ;
1606 real a = logj1 - 2.0*logj2 + logj3 ;
1607 real b = logj1 - logj2 ;
1608 real c = std::log10(normJ) - logj1 ;
1611 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1612 (
double ) std::abs( a ), mLabel.c_str() ) ;
1614 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1616 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1617 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1618 real dt_dJ = dt_dc * dc_dJ ;
1620 real logrho1 = std::log10(rho1) ;
1621 real logrho2 = std::log10(rhon) ;
1622 real logrho3 = std::log10(rhon) ;
1624 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1626 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1628 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1641 "wrong powerlaw derivative for material %s", mLabel.c_str() ) ;
1656 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1657 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1659 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1660 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1664 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1665 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1666 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1669 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1676 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1678 real logj1 = std::log10(j1) ;
1679 real logj2 = std::log10(j2) ;
1680 real logj3 = std::log10(j3) ;
1682 real a = logj1 - 2.0*logj2 + logj3 ;
1683 real b = logj1 - logj2 ;
1684 real c = std::log10(normJ) - logj1 ;
1687 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1688 (
double ) std::abs( a ), mLabel.c_str() ) ;
1690 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1692 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1693 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1694 real dt_dJ = dt_dc * dc_dJ ;
1696 real logrho1 = std::log10(rho1) ;
1697 real logrho2 = std::log10(rhon) ;
1698 real logrho3 = std::log10(rhon) ;
1700 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1702 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1704 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1731 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1732 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1734 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1735 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1739 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin );
1740 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1741 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1744 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1751 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1753 real logj1 = std::log10(j1) ;
1754 real logj2 = std::log10(j2) ;
1755 real logj3 = std::log10(j3) ;
1757 real a = logj1 - 2.0*logj2 + logj3 ;
1758 real b = logj1 - logj2 ;
1759 real c = std::log10(normJ) - logj1 ;
1762 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1763 (
double ) std::abs( a ), mLabel.c_str() ) ;
1765 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1767 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1768 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1769 real dt_dJ = dt_dc * dc_dJ ;
1771 real logrho1 = std::log10(rho1) ;
1772 real logrho2 = std::log10(rhon) ;
1773 real logrho3 = std::log10(rhon) ;
1775 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1777 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1779 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1804 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1805 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1807 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1808 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1812 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1813 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1814 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1817 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1824 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1826 real logj1 = std::log10(j1) ;
1827 real logj2 = std::log10(j2) ;
1828 real logj3 = std::log10(j3) ;
1830 real a = logj1 - 2.0*logj2 + logj3 ;
1831 real b = logj1 - logj2 ;
1832 real c = std::log10(normJ) - logj1 ;
1835 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1836 (
double ) std::abs( a ), mLabel.c_str() ) ;
1838 cplx d = b*b + a*c ;
1840 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1841 (
double ) std::abs( d ), mLabel.c_str() ) ;
1843 cplx tParam = ( b + std::sqrt( d ) ) / a ;
1845 cplx dt_dc = 0.5 / std::sqrt( d ) ;
1846 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1847 cplx dt_dJ = dt_dc * dc_dJ ;
1849 real logrho1 = std::log10(rho1) ;
1850 real logrho2 = std::log10(rhon) ;
1851 real logrho3 = std::log10(rhon) ;
1853 cplx dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1855 cplx rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1857 cplx drho_dJ =
rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1860 "Piecewise power law derivative: imaginary part of drho_dJ is non-zero (|a| = %g) for material %s, %g + i * %g",
1861 (
double ) std::imag( drho_dJ ), mLabel.c_str(), std::real( drho_dJ ) , std::imag( drho_dJ ) ) ;
1863 return std::real( drho_dJ ) ;
1883 real jc = this->
jc_eval( T, normB, angleNxB ) * ((this->mDefectFunction) (x,y,z,t)) ;
1888 BELFEM_ASSERT(
jc > 0.0,
"Piecewise power law derivative requires jc > 0 (got jc = %g) for material %s", (
double )
jc, mLabel.c_str() ) ;
1889 BELFEM_ASSERT(
n > 1.0,
"Piecewise power law derivative requires n > 1 (got n = %g) for material %s", (
double )
n, mLabel.c_str() ) ;
1891 real j1 =
jc * std::pow(10.0, 2.5/
n) ;
1892 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin) ;
1896 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1897 real drho_PL_dJ = (
ec / std::pow(
jc, 2) ) * (
n - 1.0 ) * std::pow( normJ/
jc,
n - 2.0 );
1898 return drho_PL_dJ/std::pow((1+rhoPL/rhon),2.0) ;
1901 real j3 = j1 * std::pow((rhon/rho1), 1.0/(mNff)) ;
1908 real j2 = j1 * std::pow((rhon/rho1), 1.0/(
n-1.0)) ;
1910 real logj1 = std::log10(j1) ;
1911 real logj2 = std::log10(j2) ;
1912 real logj3 = std::log10(j3) ;
1914 real a = logj1 - 2.0*logj2 + logj3 ;
1915 real b = logj1 - logj2 ;
1916 real c = std::log10(normJ) - logj1 ;
1919 "Piecewise power law derivative: degenerate Bezier transition (|a| = %g) for material %s",
1920 (
double ) std::abs( a ), mLabel.c_str() ) ;
1922 real tParam = (b + std::pow(b*b + a*c, 0.5)) / a ;
1924 real dt_dc = 0.5 / std::pow(b*b + a*c, 0.5) ;
1925 real dc_dJ = 1.0 / (normJ * std::log(10.0)) ;
1926 real dt_dJ = dt_dc * dc_dJ ;
1928 real logrho1 = std::log10(rho1) ;
1929 real logrho2 = std::log10(rhon) ;
1930 real logrho3 = std::log10(rhon) ;
1932 real dlogrho_dt = -2.0*(1.0-tParam)*logrho1 + 2.0*(1.0-2.0*tParam)*logrho2 + 2.0*tParam*logrho3 ;
1934 real rho = std::pow(10.0, (1.0-tParam)*(1.0-tParam)*logrho1 + 2.0*(1.0-tParam)*tParam*logrho2 + tParam*tParam*logrho3) ;
1936 return rho * std::log(10.0) * dlogrho_dt * dt_dJ ;
1976 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
1979 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
1982 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
1984 real dp0dB = p0 * ( -(
n /
jc ) * djcdB
1985 + std::log( normJ /
jc ) * dndB ) ;
1987 return dp0dB / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 ) ;
1999 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2006 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2009 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2011 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2013 real dp0dB = p0 * ( -(
n /
jc ) * djcdB
2014 + std::log( normJ /
jc ) * dndB ) ;
2016 return dp0dB / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 ) ;
2037 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2041 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2042 if ( normJ > j1 )
return 0.0 ;
2046 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2048 return p0 * ( -(
n /
jc ) * djcdB
2049 + std::log( normJ /
jc ) * dndB ) ;
2064 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2071 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2073 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2074 if ( normJ > j1 )
return 0.0 ;
2076 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2078 return p0 * ( -(
n /
jc ) * djcdB
2079 + std::log( normJ /
jc ) * dndB ) ;
2128 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2131 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2133 real dp0dT = p0 * ( -(
n /
jc ) * djcdT
2134 + std::log( normJ /
jc ) * dndT ) ;
2136 return dp0dT / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 )
2137 + dadT * std::pow( rhoPL / ( rhon + rhoPL ), 2.0 ) ;
2149 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2159 real rhoPL = std::max((
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ), mRhoMin ) ;
2161 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2163 real dp0dT = p0 * ( -(
n /
jc ) * djcdT
2164 + std::log( normJ /
jc ) * dndT ) ;
2166 return dp0dT / std::pow( ( 1.0 + rhoPL / rhon ), 2.0 )
2167 + dadT * std::pow( rhoPL / ( rhon + rhoPL ), 2.0 ) ;
2192 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2197 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2199 return p0 * ( -(
n /
jc ) * djcdT
2200 + std::log( normJ /
jc ) * dndT ) ;
2204 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin ) ;
2207 real j3 = j1 * std::pow( rhon / rho1, 1.0 / ( mNff ) ) ;
2222 real j2 = j1 * std::pow( rhon / rho1, 1.0 / (
n - 1.0 ) ) ;
2224 real logj1 = std::log10( j1 ) ;
2225 real logj2 = std::log10( j2 ) ;
2227 real a = logj1 - 2.0 * logj2 + std::log10( j3 ) ;
2228 real b = logj1 - logj2 ;
2229 real c = std::log10( normJ ) - logj1 ;
2232 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
2233 (
double ) std::abs( a ), mLabel.c_str() ) ;
2235 real tDisc = b * b + a * c ;
2236 real tSqrt = std::pow( tDisc, 0.5 ) ;
2237 real tParam = ( b + tSqrt ) / a ;
2239 real rhoFF = std::pow( 10.0,
2240 std::log10( rho1 ) * ( 1.0 - tParam ) * ( 1.0 - tParam )
2241 + std::log10( rhon ) * 2.0 * ( 1.0 - tParam ) * tParam
2242 + std::log10( rhon ) * tParam * tParam ) ;
2245 real dlnrho1dT = -djcdT /
jc + 2.5 * std::log( 10.0 ) / (
n *
n ) * dndT ;
2247 real tFrozen = rhoFF * ( ( 2.0 * tParam - tParam * tParam ) * dadT / rhon
2248 + ( 1.0 - tParam ) * ( 1.0 - tParam ) * dlnrho1dT ) ;
2261 real dlnj1dT = -dlnrho1dT ;
2262 real dlnrhondT = dadT / rhon ;
2263 real dlnj3dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / mNff ;
2264 real dlnj2dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / (
n - 1.0 )
2265 - dndT / ( (
n - 1.0 ) * (
n - 1.0 ) )
2266 * std::log( rhon / rho1 ) ;
2269 real tInvLn10 = 1.0 / std::log( 10.0 ) ;
2270 real dA = ( dlnj1dT - 2.0 * dlnj2dT + dlnj3dT ) * tInvLn10 ;
2271 real dB = ( dlnj1dT - dlnj2dT ) * tInvLn10 ;
2272 real dC = -dlnj1dT * tInvLn10 ;
2312 real dSdT = ( 2.0 * b * dB + dA * c + a * dC ) / ( 2.0 * tSqrt ) ;
2313 real dtdT = ( ( dB + dSdT ) - tParam * dA ) / a ;
2319 + rhoFF * 2.0 * ( 1.0 - tParam ) * std::log( rhon / rho1 ) * dtdT ;
2336 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2343 real j1 =
jc * std::pow( 10.0, 2.5 /
n ) ;
2348 real p0 = (
ec /
jc ) * std::pow( normJ /
jc,
n - 1 ) ;
2350 return p0 * ( -(
n /
jc ) * djcdT
2351 + std::log( normJ /
jc ) * dndT ) ;
2355 real rho1 = std::max((
ec /
jc ) * std::pow( j1 /
jc,
n - 1 ), mRhoMin ) ;
2357 real j3 = j1 * std::pow( rhon / rho1, 1.0 / ( mNff ) ) ;
2363 real j2 = j1 * std::pow( rhon / rho1, 1.0 / (
n - 1.0 ) ) ;
2365 real logj1 = std::log10( j1 ) ;
2366 real logj2 = std::log10( j2 ) ;
2368 real a = logj1 - 2.0 * logj2 + std::log10( j3 ) ;
2369 real b = logj1 - logj2 ;
2370 real c = std::log10( normJ ) - logj1 ;
2373 "Piecewise power law: degenerate Bezier transition (|a| = %g) for material %s",
2374 (
double ) std::abs( a ), mLabel.c_str() ) ;
2376 real tDisc = b * b + a * c ;
2377 real tSqrt = std::pow( tDisc, 0.5 ) ;
2378 real tParam = ( b + tSqrt ) / a ;
2380 real rhoFF = std::pow( 10.0,
2381 std::log10( rho1 ) * ( 1.0 - tParam ) * ( 1.0 - tParam )
2382 + std::log10( rhon ) * 2.0 * ( 1.0 - tParam ) * tParam
2383 + std::log10( rhon ) * tParam * tParam ) ;
2386 real dlnrho1dT = -djcdT /
jc + 2.5 * std::log( 10.0 ) / (
n *
n ) * dndT ;
2388 real tFrozen = rhoFF * ( ( 2.0 * tParam - tParam * tParam ) * dadT / rhon
2389 + ( 1.0 - tParam ) * ( 1.0 - tParam ) * dlnrho1dT ) ;
2402 real dlnj1dT = -dlnrho1dT ;
2403 real dlnrhondT = dadT / rhon ;
2404 real dlnj3dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / mNff ;
2405 real dlnj2dT = dlnj1dT + ( dlnrhondT - dlnrho1dT ) / (
n - 1.0 )
2406 - dndT / ( (
n - 1.0 ) * (
n - 1.0 ) )
2407 * std::log( rhon / rho1 ) ;
2410 real tInvLn10 = 1.0 / std::log( 10.0 ) ;
2411 real dA = ( dlnj1dT - 2.0 * dlnj2dT + dlnj3dT ) * tInvLn10 ;
2412 real dB = ( dlnj1dT - dlnj2dT ) * tInvLn10 ;
2413 real dC = -dlnj1dT * tInvLn10 ;
2453 real dSdT = ( 2.0 * b * dB + dA * c + a * dC ) / ( 2.0 * tSqrt ) ;
2454 real dtdT = ( ( dB + dSdT ) - tParam * dA ) / a ;
2460 + rhoFF * 2.0 * ( 1.0 - tParam ) * std::log( rhon / rho1 ) * dtdT ;
2498 return std::isfinite( rhoPL ) && rhoPL >= 0.0 ;
2507 + (
n - 1.0 ) * std::log10( normJ /
jc ) ;
2514 if ( ! ( lg <= 250.0 ) )
2518 rhoPL = std::max( std::pow( 10.0, lg ), mRhoMin ) ;
2537 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
2549 return rhoPL > rhon ? rhon / ( 1.0 + rhon / rhoPL )
2550 : rhoPL / ( 1.0 + rhoPL / rhon ) ;
2566 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2567 if (
n <= 1.0 )
return 0.0 ;
2577 real w = rhon / ( rhoPL + rhon ) ;
2581 return ( w * rhoPL ) * ( w * (
n - 1.0 ) / normJ ) ;
2596 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2606 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2615 real w = rhon / ( rhoPL + rhon ) ;
2622 return ( w * rhoPL ) * ( w * ( -(
n * ( djcdB /
jc ) )
2624 : std::log( normJ ) - std::log(
jc ) ) * dndB ) ) ;
2642 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return dadT ;
2654 real w = rhon / ( rhoPL + rhon ) ;
2655 real v = rhoPL / ( rhoPL + rhon ) ;
2662 real dlnp = ( normJ < BELFEM_EPSILON && n > 1.0 ) ? 0.0 :
2663 -(
n * ( djcdT /
jc ) )
2665 : std::log( normJ ) - std::log(
jc ) ) * dndT ;
2667 return ( w * rhoPL ) * ( w * dlnp ) + v * v * dadT ;
2682 real jc = this->
jc_eval( T, normB, angleNxB ) * ( ( this->mDefectFunction )( x, y, z, t ) ) ;
2685 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
2696 return rhoPL > rhon ? rhon / ( 1.0 + rhon / rhoPL )
2697 : rhoPL / ( 1.0 + rhoPL / rhon ) ;
2710 real jc = this->
jc_eval( T, normB, angleNxB ) * ( ( this->mDefectFunction )( x, y, z, t ) ) ;
2713 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2714 if (
n <= 1.0 )
return 0.0 ;
2724 real w = rhon / ( rhoPL + rhon ) ;
2728 return ( w * rhoPL ) * ( w * (
n - 1.0 ) / normJ ) ;
2741 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2745 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return 0.0 ;
2754 if ( djcdB == 0.0 && dndB == 0.0 )
return 0.0 ;
2763 real w = rhon / ( rhoPL + rhon ) ;
2768 return ( w * rhoPL ) * ( w * ( -(
n * ( djcdB /
jc ) )
2770 : std::log( normJ ) - std::log(
jc ) ) * dndB ) ) ;
2785 real tD = ( this->mDefectFunction )( x, y, z, t ) ;
2789 if ( ! (
jc > 0.0 && std::isfinite(
jc ) ) )
return dadT ;
2802 real w = rhon / ( rhoPL + rhon ) ;
2803 real v = rhoPL / ( rhoPL + rhon ) ;
2807 real dlnp = ( normJ < BELFEM_EPSILON && n > 1.0 ) ? 0.0 :
2808 -(
n * ( djcdT /
jc ) )
2810 : std::log( normJ ) - std::log(
jc ) ) * dndT ;
2812 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
Check if a property is constant (temperature-independent).
Definition cl_Material.hpp:1781
real rho_powerlaw(const real normJ) const
Power law resistivity for HTS (constant jc and n).
Definition powerlaws.hpp:184
virtual real rho(const real T) const
Electrical resistivity (isotropic).
Definition cl_Material.hpp:2038
virtual real jc_custom(const real T) const
Definition cl_Material.cpp:574
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:976
real n_eval_raw(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:76
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:2585
const material::JcFunction * mJcFunction
Definition cl_Material.hpp:414
virtual real drhodT(const real T) const
Definition cl_Material.hpp:2049
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:2171
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:66
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:2020
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:1788
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:2554
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:110
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:1964
real rho_piecewise(const real normJ) const
Piecewise resistivity for HTS (constant jc and n).
Definition powerlaws.hpp:412
real djc_eval_dB(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:102
bool riva_rho_pl(const real normJ, const real jc, const real n, const real ec, real &rhoPL) const
Definition powerlaws.hpp:2489
real n_eval(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:86
real jc(const real normB, const real angleNxB, const real T) const
Direct evaluation of the critical current density .
Definition powerlaws.hpp:1012
real djc_eval_dT(const real T, const real normB, const real angleNxB) const
Definition powerlaws.hpp:126
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:134
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:2113
real constant_property(const MaterialProperty aProperty) const
Get constant property value.
Definition cl_Material.hpp:1787
const material::JcFunction * mNFunction
Definition cl_Material.hpp:415
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:2628
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:1240
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:2524
virtual real n_custom(const real T) const
Definition cl_Material.cpp:581
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
Check if function depends on a parameter.
Definition cl_JcFunction.hpp:281
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
std::complex< real > cplx
Definition typedefs.hpp:37
greal gTbulk
Definition globals.hpp:45
constexpr real BELFEM_EPSILON
Definition typedefs.hpp:90
@ 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