Giter Site home page Giter Site logo

momargoh / mcycle Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 5.0 68.13 MB

A Python package for 1D sizing and analysis of thermodynamic power cycles

License: Apache License 2.0

Python 20.28% Cython 79.72%
thermodynamics heat-transfer power-cycle thermodynamics-models heat-exchanger

mcycle's People

Contributors

chenlingj avatar momargoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mcycle's Issues

Setting up MCycle issue

I have the following issue:

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

CoolProp installation instructions

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.

`CXXABI_1.3.9' not found

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).

quickstart.py not compatible with pip version

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?

HxSimple

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?

References?

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.

Example problem takes too long to solve

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.