-
Notifications
You must be signed in to change notification settings - Fork 44
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
run isothermal Soret channel as a test #441
Merged
baperry2
merged 13 commits into
AMReX-Combustion:development
from
baperry2:soret-isothermal-test
Jan 3, 2025
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b1eb277
run isothermal Soret channel as a test
baperry2 9488262
fix warns
baperry2 8823cbb
remove unused input from isothermal soret
baperry2 db25cf2
remove more unused
baperry2 82daf2b
Merge branch 'development' into soret-isothermal-test
baperry2 3c97f76
add python test to verify species conservation
baperry2 14fadee
add a bit of documentation on Soret + isothermal
baperry2 f1d4612
Merge branch 'development' into soret-isothermal-test
ThomasHowarth febc3e7
fix typos in docs
baperry2 8ac8003
fix up copy/paste stuff in python test
baperry2 bae3cbb
uncomment fpe trapping
baperry2 721b8ce
re-comment out some FPE trapping stuff
baperry2 6b5236f
fix another typo in docs
baperry2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import os | ||
import numpy.testing as npt | ||
import pandas as pd | ||
import unittest | ||
|
||
class SpeciesBalTestCase(unittest.TestCase): | ||
"""Test species balance with isothermal walls and soret""" | ||
|
||
def test_composition(self): | ||
"""Verify species conservation""" | ||
|
||
# Load the data | ||
fdir = os.path.abspath(".") | ||
fname = os.path.join(fdir, "temporals/tempSpecies") | ||
df = pd.read_csv(fname) | ||
print(df) | ||
for col in df.columns: | ||
if col.startswith('rhoYnew'): | ||
init_value = df[col][0] | ||
if init_value != 0.0: | ||
print('testing (relative)', col) | ||
npt.assert_allclose(df[col], init_value, rtol=1e-13) | ||
else: | ||
print('testing (absolute)', col) | ||
npt.assert_allclose(df[col], init_value, atol=1e-13) | ||
if col.startswith('netFlux'): | ||
print('testing (absolute)', col) | ||
npt.assert_allclose(df[col], 0.0, atol=1e-13) | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof. Clearly I hadn't woken back up all the way from the holidays when I made the fixes. Fixed now.