-
Notifications
You must be signed in to change notification settings - Fork 26
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
Revamp thermodynamic state documentation #78
Conversation
Codecov Report
@@ Coverage Diff @@
## main #78 +/- ##
=======================================
Coverage 29.67% 29.67%
=======================================
Files 25 25
Lines 2362 2362
=======================================
Hits 701 701
Misses 1661 1661
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Why are you not implementing this for the |
@marcomangano That was my logic with regards to not implementing it for that option but if you think it makes sense to be able to override it, I can fix that. I actually need to write some regression testing to make sure this code is covered (coverage just went down) so do not merge this yet. |
I'm fine with this feature in principle. |
Yeah I see your concern. The point of this PR is to enable the user to override the Sutherland's law calculation so the overall thermodynamic state should still be self-consistent. Maybe we can have the code printing a message when it detects the |
@awccopp I assume your cases with "custom" |
To dos:
|
@sseraj I had a look at |
Codecov is failing because I changed numpy to np. The solution @sseraj and I came to was to document how to better specify mu in the AeroProblem setup. If one sets With this solution, no overriding of Sutherland's law has to take place in |
Is this PR ready for review? |
There is one item left for me to complete (adding docs for each input combination). I will try to complete that soon. |
No rush. I just wasn't sure because my review was requested but it is still marked as a draft PR. |
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.
The docs are much clearer now, thanks for the work! Unless @eirikurj wants to take a look I will merge it soon
Purpose
For computing dynamic viscosity, liquid water does not follow Sutherland's law; it follows another equation (Andrade's eqn for the interested person).
I added a fix to manually set the dynamic viscosity when setting up theAeroProblem()
that when you specifymu
, it will override the Sutherland law calculation. Doing so avoids viscosity dependence on temperature in theself.updateViscosity()
call. I decided on this fix after @awccopp said he also had a use for specifying the dynamic viscosity.This works for all thermodynamic specification methods EXCEPT for the 'mach' + 'altitude' method.The example aeroproblem I put in the docstring has cavitation in the evalFuncs so maybe wait until this ADflow PR is merged.
EDIT:
The new fix for water does not require overriding anything but rather, exploiting the Sutherland's law calculation. It has been documented in the code. See conversation.
Expected time until merged
Not urgent. 1-2 weeks?
Type of change
Testing
No tests because we ended up only changing the docs.
Checklist
flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted