Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymatlib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rahil Doshi
pymatlib
Commits
d87357d2
Commit
d87357d2
authored
3 months ago
by
Rahil Doshi
Browse files
Options
Downloads
Patches
Plain Diff
Update test_yaml_config.py
parent
15c021f8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/python/test_yaml_config.py
+4
-2
4 additions, 2 deletions
tests/python/test_yaml_config.py
with
4 additions
and
2 deletions
tests/python/test_yaml_config.py
+
4
−
2
View file @
d87357d2
...
@@ -26,14 +26,16 @@ print(f"Composition: {ss316l.composition}")
...
@@ -26,14 +26,16 @@ print(f"Composition: {ss316l.composition}")
# Print the composition of each element in the alloy
# Print the composition of each element in the alloy
for
i
in
range
(
len
(
ss316l
.
composition
)):
for
i
in
range
(
len
(
ss316l
.
composition
)):
print
(
f
"
Element
{
ss316l
.
elements
[
i
]
}
: Composition
{
ss316l
.
composition
[
i
]
}
"
)
print
(
f
"
Element
{
ss316l
.
elements
[
i
]
}
: Composition
{
ss316l
.
composition
[
i
]
}
"
)
print
(
f
"
Solidus Temperature:
{
ss316l
.
temperature_solidus
}
"
)
print
(
f
"
\n
Solidus Temperature:
{
ss316l
.
temperature_solidus
}
"
)
print
(
f
"
Liquidus Temperature:
{
ss316l
.
temperature_liquidus
}
"
)
print
(
f
"
Liquidus Temperature:
{
ss316l
.
temperature_liquidus
}
"
)
print
(
"
\n
Testing SS316L with symbolic temperature:
"
)
print
(
"
\n
Testing SS316L with symbolic temperature:
"
)
for
field
in
vars
(
ss316l
):
for
field
in
vars
(
ss316l
):
print
(
f
"
{
field
}
=
{
ss316l
.
__getattribute__
(
field
)
}
"
)
print
(
f
"
{
field
}
=
{
ss316l
.
__getattribute__
(
field
)
}
"
)
# Test computed properties at specific temperature
# Test computed properties at specific temperature
test_temp
=
1
60
5
test_temp
=
1
73
5
print
(
f
"
\n
Properties at
{
test_temp
}
K:
"
)
print
(
f
"
\n
Properties at
{
test_temp
}
K:
"
)
print
(
f
"
Density:
{
print_property_value
(
ss316l
.
density
,
T
,
test_temp
)
}
"
)
print
(
f
"
Density:
{
print_property_value
(
ss316l
.
density
,
T
,
test_temp
)
}
"
)
print
(
f
"
Specific enthalpy:
{
print_property_value
(
ss316l
.
specific_enthalpy
,
T
,
test_temp
)
}
"
)
print
(
f
"
Specific enthalpy:
{
print_property_value
(
ss316l
.
specific_enthalpy
,
T
,
test_temp
)
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment