Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tInputWarning validation to unit tests #861

Closed
john-science opened this issue Aug 25, 2022 · 1 comment
Closed

Move tInputWarning validation to unit tests #861

john-science opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels
cleanup Code/comment cleanup: Low Priority testing Related to tests

Comments

@john-science
Copy link
Member

This basic Material validation test is happening during runtime, but I believe it should be handled as a unit test:

def tInputWarning(self, Tinput):
"""
Check whether thermal expansion factor is 0.0% exactly at T=Tinput
"""
expansionFactor = (
self.material.linearExpansionPercent(Tc=self.inputTemperatureInC) / 100.0
)
if not (abs(expansionFactor) < 1.0e-6):
runLog.warning(
f"Thermal expansion for {self.material} at Tinput = {Tinput} is non-zero "
f"({expansionFactor}). The modeled density for this material will be off "
f"by a factor of {(1 + expansionFactor) ** 2}.",
single=True,
)

@john-science john-science added cleanup Code/comment cleanup: Low Priority testing Related to tests labels Aug 25, 2022
@john-science john-science self-assigned this Aug 25, 2022
@mgjarrett
Copy link
Contributor

See #860; it's going to remove this method entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code/comment cleanup: Low Priority testing Related to tests
Projects
None yet
Development

No branches or pull requests

2 participants