Skip to content

Commit

Permalink
improve warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bobmyhill committed Nov 26, 2024
1 parent db81da0 commit 0cddecb
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions burnman/eos/spock.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,22 @@ def validate_parameters(self, params):
if params["Kprime_0"] < 0.0 or params["Kprime_0"] > 10.0:
warnings.warn("Unusual value for Kprime_0", stacklevel=2)
if params["Kdprime_0"] > 0.0:
warnings.warn("Unusual value for Kdprime_0", stacklevel=2)
warnings.warn("Kdprime_0 should be negative", stacklevel=2)
if (
-params["Kdprime_0"] * params["K_0"]
< params["Kprime_0"] - params["Kprime_inf"]
):
warnings.warn(
"Kdprime_0*K_0 is expected to be more "
"negative than (Kprime_0 - Kprime_inf)",
stacklevel=2,
)
if (
params["Kprime_inf"] < 5.0 / 3.0
or params["Kprime_inf"] > params["Kprime_0"]
):
warnings.warn("Unusual value for Kprime_inf", stacklevel=2)
warnings.warn(
"Kprime_inf is expected to be greater "
"than the Thomas-Fermi limit (5/3)",
stacklevel=2,
)

0 comments on commit 0cddecb

Please sign in to comment.