Physics Equation Templates¶
Reusable materials-physics equation templates for physics-informed GPR mean functions.
matgpr.physics_equations
¶
PhysicsFeatureSpec
dataclass
¶
Metadata for one canonical physics-equation input feature.
Source code in matgpr/physics_equations.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
to_dict()
¶
Return a serializable feature metadata record.
Source code in matgpr/physics_equations.py
63 64 65 66 67 68 69 70 | |
PhysicsParameterSpec
dataclass
¶
Metadata for one physics-equation parameter.
Source code in matgpr/physics_equations.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
to_dict()
¶
Return a serializable parameter metadata record.
Source code in matgpr/physics_equations.py
93 94 95 96 97 98 99 100 101 102 103 | |
PhysicsEquationTemplate
dataclass
¶
Reusable physics-equation metadata for physics-informed GPR.
A template stores the equation callable plus the features, default
learnable-parameter initial values, fixed constants, sign constraints, and
documentation needed to use the equation as a
:class:matgpr.PhysicsInformedMean.
Source code in matgpr/physics_equations.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | |
required_features
property
¶
Feature names expected by the equation callable.
learnable_parameter_names
property
¶
Default parameter names optimized jointly with the GP.
fixed_parameter_names
property
¶
Default fixed-constant names passed to the equation.
feature_specs()
¶
Return report-ready metadata for the required input features.
Source code in matgpr/physics_equations.py
202 203 204 205 206 207 208 209 210 211 212 | |
parameter_specs()
¶
Return report-ready metadata for learned and fixed parameters.
Source code in matgpr/physics_equations.py
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
build_mean_function(feature_indices, *, learnable_parameter_overrides=None, fixed_parameter_overrides=None, positive_parameters=None, feature_means=None, feature_stds=None, target_mean=0.0, target_std=1.0, strict_features=True)
¶
Build a :class:matgpr.PhysicsInformedMean from this template.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
feature_indices
|
Mapping[str, int]
|
Mapping from template feature names to columns in the model feature matrix. Keys use the template's canonical feature names even if the original dataframe columns have different names. |
required |
learnable_parameter_overrides
|
Mapping[str, float] | None
|
Optional initial values that replace selected template defaults. |
None
|
fixed_parameter_overrides
|
Mapping[str, float] | None
|
Optional fixed constants that replace selected template defaults. |
None
|
positive_parameters
|
Sequence[str] | None
|
Optional replacement for the template positive-parameter list. |
None
|
feature_means
|
Mapping[str, float] | None
|
Optional scaling metadata so the physics equation receives original physical units when the GPR feature matrix is standardized. |
None
|
feature_stds
|
Mapping[str, float] | None
|
Optional scaling metadata so the physics equation receives original physical units when the GPR feature matrix is standardized. |
None
|
target_mean
|
float
|
Target standardization metadata passed to |
0.0
|
target_std
|
float
|
Target standardization metadata passed to |
0.0
|
strict_features
|
bool
|
If |
True
|
Source code in matgpr/physics_equations.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |
summary()
¶
Return a compact serializable summary for reports.
Source code in matgpr/physics_equations.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
discovery_record()
¶
Return complete metadata for registry/discovery workflows.
Source code in matgpr/physics_equations.py
339 340 341 342 343 344 345 346 347 348 349 | |
arrhenius_rate_equation(features, parameters)
¶
Temperature-activated Arrhenius response.
The equation is A exp(-E_a / (R T)). It is useful for transport,
reaction, diffusion, conductivity, and rate-like material properties when
temperature is an important control variable.
Source code in matgpr/physics_equations.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
arrhenius_sqrt_time_equation(features, parameters)
¶
Parabolic-growth mean from Arrhenius rate and exposure time.
The equation is offset + sqrt(A exp(-E_a / (R T)) time). It is useful
for oxidation, diffusion-depth, aging, and other square-root-time trends.
Source code in matgpr/physics_equations.py
375 376 377 378 379 380 381 382 383 384 385 386 387 | |
arrhenius_linear_growth_equation(features, parameters)
¶
Linear-growth mean controlled by an Arrhenius rate.
The equation is offset + A exp(-E_a / (R T)) time. It is useful for
reaction-controlled oxidation, aging, or damage accumulation when the
response is approximately linear in time at fixed temperature.
Source code in matgpr/physics_equations.py
390 391 392 393 394 395 396 397 398 399 400 401 402 403 | |
linear_growth_equation(features, parameters)
¶
Linear growth with exposure time or another nonnegative driving variable.
The equation is offset + rate * time. It is useful for oxidation,
aging, damage accumulation, or thickness/mass growth when a first-order
time trend is an appropriate physics prior.
Source code in matgpr/physics_equations.py
406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
linear_parabolic_growth_equation(features, parameters)
¶
Linear-parabolic growth from mixed interface and diffusion control.
The equation solves m(t)^2 + linear_rate * m(t) = parabolic_rate * time
for the nonnegative root and adds an optional offset. It is useful for
oxidation or other growth processes that transition smoothly between
interface-controlled and diffusion-controlled kinetics.
Source code in matgpr/physics_equations.py
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
power_law_equation(features, parameters)
¶
Power-law scaling with a single driving variable.
The equation is offset + coefficient * driving_variable ** exponent.
It is a compact template for load effects, rate effects, and empirical
scaling laws where a log-log trend is expected.
Source code in matgpr/physics_equations.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | |
hall_petch_equation(features, parameters)
¶
Hall-Petch-style inverse-square-root grain-size trend.
The equation is intrinsic_property + coefficient / sqrt(grain_size).
It is useful for strength, hardness, yield stress, or related properties
when grain-size strengthening is physically plausible.
Source code in matgpr/physics_equations.py
459 460 461 462 463 464 465 466 467 468 469 470 471 472 | |
free_volume_exponential_equation(features, parameters)
¶
Free-volume exponential trend for polymer transport properties.
The equation is offset + prefactor * exp(-barrier / free_volume_fraction).
It is useful for diffusion, permeability, and segmental-mobility trends in
polymers when fractional free volume is available.
Source code in matgpr/physics_equations.py
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 | |
rule_of_mixtures_equation(features, parameters)
¶
Linear rule of mixtures with an optional interaction term.
The equation is (1 - phi) matrix_property + phi inclusion_property +
interaction phi (1 - phi). It is useful for composite, alloy, blend, or
mixture properties when phase fraction is known.
Source code in matgpr/physics_equations.py
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | |
list_physics_equation_templates()
¶
Return the registered reusable physics equation templates.
Source code in matgpr/physics_equations.py
513 514 515 | |
available_physics_equation_templates(*, include_aliases=False)
¶
Return available template names, optionally including aliases.
Source code in matgpr/physics_equations.py
518 519 520 521 522 523 524 525 | |
get_physics_equation_template(name)
¶
Return a physics-equation template by name or alias.
Source code in matgpr/physics_equations.py
528 529 530 531 532 533 534 535 536 537 | |
describe_physics_equation_template(name)
¶
Return complete registry metadata for one physics-equation template.
Source code in matgpr/physics_equations.py
540 541 542 | |
search_physics_equation_templates(query=None, *, application=None, tag=None, required_features=None)
¶
Search registered templates by text, application, tag, or features.
This searches the built-in, human-authored template registry. It does not automatically discover new equations from data.
Source code in matgpr/physics_equations.py
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 | |
summarize_physics_equation_templates(*, include_aliases=True)
¶
Return a dataframe summary of registered physics-equation templates.
Source code in matgpr/physics_equations.py
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |