momargoh / mcycle Goto Github PK
View Code? Open in Web Editor NEWA Python package for 1D sizing and analysis of thermodynamic power cycles
License: Apache License 2.0
A Python package for 1D sizing and analysis of thermodynamic power cycles
License: Apache License 2.0
import mcycle as mc
import CoolProp as CP
mc.DEFAULTS.PLOT_DIR = "" # will not create a new folder for plots
mc.DEFAULTS.PLOT_DPI = 200
mc.DEFAULTS.updateDefaults()
Traceback (most recent call last):
File "", line 1, in
AttributeError: module 'mcycle.DEFAULTS' has no attribute 'updateDefaults'
Cython, numpy, scipy, matplotlib and CoolProp are all up to date
Consider removing the recommendation to do a manual install of CoolProp. With my Ubuntu 16.04 setup, the "get it directly from the development server" link they provide worked when the manual install did not after many attempts.
When attempting to import mcycle in Python, I receive an Import Error which has this at the end:
/anaconda3/bin/../lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/usrname/anaconda3/lib/python3.6/site-packages/scipy/sparse/_sparsetools.cpython-36m-x86_64-linux-gnu.so)
I've done some searching and have tried a few remedies including reinstalling scipy and libgcc. I'm not entirely sure, but it may be an anaconda issue more than anything. I am using Ubuntu 16.04 and Python 3.6.4 :: Anaconda custom (64-bit).
I pip MCycle 1.0.1 from git.
When i run example quickstart.py, i got some errors, such as :
1.
mc.DEFAULTS.updateDefaults() -> AttributeError: module 'mcycle.DEFAULTS' has no attribute 'updateDefaults'
2.
cycle.update({
"pEvap": mc.bar2pa(10),
"superheat": 10.,
"TCond": mc.degC2K(25),
"subcool": 5.
}) -> TypeError: update() takes 1 positional argument but 2 were given
3.
cycleStateKeys='all', -> TypeError: summary() got an unexpected keyword argument 'cycleStateKeys'
4.
Q_vals = Qfraction_vals * cycle.QIn() -> TypeError: 'float' object is not callable
and others.
I thick this example is not update for new version?
Thank you for creating this repo. With a little editing I was able to get the Hughes example running but for the life of me I cannot get a basic condenser heat exchanger example working. First I tried to finish the HxSimple class you were working on but was unsuccessful, so I tried a simplified HxPlate based on what you have in heat_exchangers.py
but it either crashes the kernel or throws errors. For context I am building out an Ocean Thermal Energy rankine cycle with Ammonia as the working fluid:
wf = mc.FlowState( fluid="Ammonia", m=1.0, inputPair=mc.PT_INPUTS, input1=913400, input2=mc.degC2K(22.9) )
And water as the secondary fluid for cooling:
`sf = mc.FlowState(
fluid="Water",
m=132.037,
inputPair=mc.PT_INPUTS,
input1=101325,
input2=mc.degC2K(4.2)
)`
My set up for the HxPlate is:
mc.HxPlate( flowConfig=hxFlowConfig, NPlate=500, RfWf=0, RfSf=0, plate=mc.stainlessSteel_316(), tPlate=0.95e-3, geomWf=mc.GeomHxPlateSmooth(1.45e-3), geomSf=mc.GeomHxPlateSmooth(1.45e-3), L=250e-2, W=111e-2, coeffs_LPlate=[0.060, 1], coeffs_WPlate=[0, 1], efficiencyThermal=1.0, flowInWf=None, flowInSf=None, flowOutWf=None, flowOutSf=None, ambient=None, sizeAttr="N", )
Then the RankineBasic as follows:
cycle = mc.RankineBasic( wf=wf, evap=evap, exp=exp, cond=cooler, comp=comp, config=config) cycle.update({ "pEvap": mc.bar2Pa(9.134), "superheat": 0., "pCond": mc.bar2Pa(6.152), "subcool": 0., 'sinkIn': sf, })
Any ideas?
The JOSS paper markup file has no references. I see a reference placed in a bib file for CoolProp and several heat transfer correlation references under the Heat Transfer Methods documentation. The major references should be called out on the JOSS paper markup file.
The example problem hughes2017.py took about 37 minutes to solve on my laptop. Consider separating these example steps smaller executables or simplify the problem to take less time if possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.