-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add flooding #1
Open
ibell
wants to merge
74
commits into
ibell:master
Choose a base branch
from
davideziviani:AddFlooding
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add flooding #1
Changes from 10 commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
43573a8
First ideas on adding back flooding
c158c91
Added StateFlooded.pyx
61dad93
Update StateFlooded.pyx
bansal16 938e31d
Update StateFlooded.pyx
bansal16 5c49469
Update StateFlooded.pyx
bansal16 c0b9c25
Added StateFlooded.pxd
4aa6306
added class State_Flooded
318948b
added get_dudxL
eab4e41
Update StateFlooded.pyx
bansal16 f329295
Update StateFlooded.pxd
bansal16 d70142e
Created setup file
69c8a58
Added get_rho and get_h; StateFlooded(State)
b28f2c0
Changed State_Flooded to StateFlooded(State)
f649547
Get PDSim to compile again
ibell bcd0658
state_flooded compiles (still work to be done)
ibell db4a62a
Fix typos in core.py
ibell 1325f09
Fix some of the variable definitions
ibell 6052a70
Somehow state_flooded.pyx was missing when it was renamed before
ibell df35f2d
Always use class variables. StateFlooded is working:
ibell 8b70528
A couple of mini-optimizations to help cython compilation
ibell d60cf40
Added StateFlooded Example
e809853
Added dPdT_const_V
2147de2
Modified dPdT_const_V
9fe6f7c
Not sure about self.update
a0f2e46
Update dudxL_mix
2a22e54
Update state_flooded.pyx
bansal16 7cca13d
Update state_flooded.pyx
bansal16 5929835
Update state_flooded.pyx
bansal16 cfae440
Missing ( )
2b8b1da
Spacing
ccc81e6
Working on containers to integrate StateFlooded
319b926
Added cve and cKe
655a7f3
Added twophasenozzle
22fdf08
Update state_flooded.pyx
bansal16 151c565
Update core.py
bansal16 b2630d5
Update flow_models.pyx
bansal16 c69da74
Update flow_models.pxd
bansal16 2721dcb
Update containers.pyx
bansal16 2dc21d3
Update containers.pxd
bansal16 4f4a60f
TODO
fac1613
Some docstrings
8071713
Update containers.pyx
bansal16 a80dd10
Update containers.pxd
bansal16 79e3ccc
Create Scroll_Expander.py
bansal16 1c9e821
Update flow.pyx
bansal16 a64d932
Update flow.pxd
bansal16 b2cb7a8
Update containers.pyx
bansal16 9a0df9c
Update containers.pxd
bansal16 5eea08f
Fixed units, modified Ke ve, added exergy_mix, added docstrings
c2366da
Updated PDSim version to 3.0
0ccb11f
Update flow_models.pyx
bansal16 ed3b266
Update state_flooded.pyx
bansal16 9ee43b4
Update state_flooded.pxd
bansal16 892291a
Update core.py
bansal16 c5b9d0b
Small fix
07b1425
Update core.py
bansal16 64c77c3
Fixed kstar
efe484a
Fixed inlet/outlet state
5f91e88
Fixing pre_run( ) and guess_outlet_temp ( )
4b9761d
Example get_kmix( )
2f347ad
Revert "Example get_kmix( )"
78f97ce
Example get_kstar( )
cd6c286
Fixing __hasLiquid__ in Tube class
4e13ddc
Fixed clipper example
913397f
Added polymath.pyx to be compiled
99009c4
Fixing polymath
c3ae48e
Updating Scroll_Expander example
a82da80
setup.py includes pyclipper and polmath
036ccb1
Commented some junk
4afea59
General update and clean up
4a6609e
Updated setup future release
5cce196
Added TwoPhase Nozzle flow model
4cdca21
Fix pre_run
59a710f
Debugging the geometry
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from libcpp.string cimport string | ||
import cython | ||
cimport cython | ||
|
||
from libcpp.vector cimport vector | ||
|
||
include "AbstractState.pxd" | ||
|
||
cdef extern from "Python.h": | ||
char* __FILE__ | ||
|
||
cdef extern from "Python.h": | ||
int __LINE__ | ||
|
||
|
||
|
||
|
||
""" | ||
#In Cython we would do something equivalent to CoolProp.pxd | ||
# This class inheritate from State_Flooded which calculates the mixture properties | ||
# and returns the values in a similar way of State class in CoolProp.pxd | ||
""" | ||
|
||
#TODO: check consistency with StateFlooded.pyx get_h_m or get_h. Maybe we should differentiate from standard State class and use _m to indicate mixture properties | ||
|
||
cdef class State_Flooded: | ||
cdef AbstractState pAS | ||
cdef readonly bytes Fluid, phase | ||
cdef int iFluid,iParam1,iParam2,iOutput | ||
cdef int iLiquid # Maybe ?? | ||
|
||
cdef double T_, rho_, p_, xL_, | ||
|
||
cpdef set_Fluid(self, string Fluid, string backend) | ||
cpdef set_Liquid(self, string Fluid) #No need for backend | ||
|
||
#Now the properties are all defined above and we can be consistend with the definition | ||
#I used in containers_20150419 @properties | ||
|
||
cpdef speed_test(self, int N) | ||
cpdef update(self, dict params) | ||
cpdef update_ph(self, double p, double h) | ||
cpdef update_TrhoxL(self, double T, double rho, double xL) | ||
cpdef State copy(self) | ||
cpdef double Props(self, constants_header.parameters iOutput) except * | ||
cpdef long Phase(self) except * | ||
cpdef double get_T(self) except * | ||
cpdef double get_p(self) except * | ||
cpdef double get_Q_m(self) except * | ||
cpdef double get_h_m(self) except * | ||
cpdef double get_rho_m(self) except * | ||
cpdef double get_s_m(self) except * | ||
cpdef double get_u_m(self) except * | ||
cpdef double get_visc_m(self) except * | ||
cpdef double get_cond_m(self) except * | ||
cpdef double get_cp_m(self) except * | ||
cpdef double get_cp0(self) except * #TODO: not sure if we need this one | ||
cpdef double get_cv_m(self) except * | ||
cpdef double get_dpdT(self) except * | ||
cpdef double get_dudxL(self) except* |
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.
MUST(!) derive from State class. That is the whole point.
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.
Also, better to name StateFlooded - that is more standard. Class definitions should be CamelCase, without underscores.