GithubHelp home page GithubHelp logo

hoarelea / sam_mollier Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 873 KB

own psychrometric calculations for Moist Air required for Mollier Chart

License: GNU Lesser General Public License v3.0

C# 100.00%
mollier psychrometric-chart psychrometrics mollier-chart

sam_mollier's Introduction

SAM_Mollier

SAM_Mollier is part of SAM Toolkit that is designed to help engineers to create an Analytical Model. Welcome and let's make the open-source journey continue. 🤝

The GitHub repository "HoareLea/SAM_Mollier" focuses on creating Mollier/Psychrometric charts, a crucial tool in thermodynamics and air conditioning design. It facilitates creating points and simulating various processes like cooling, heating, adiabatic and isothermic humidification. The repository is unique in using Grasshopper as a user interface, offering a more interactive and visual approach. This project is not only a valuable resource for professionals in HVAC but also for students and educators in thermodynamics. For more detailed information and resources, visit the comprehensive wiki at SAM_Mollier Wiki.

Resources

Installing

To install SAM from .exe just download and run latest installer otherwise rebuild using VS SAM

Licence

SAM is free software licensed under GNU Lesser General Public Licence - https://www.gnu.org/licenses/lgpl-3.0.html
Each contributor holds a copyright over their respective contributions. The project versioning (Git) records all such contribution source information. See LICENSE and COPYRIGHT_HEADER.

sam_mollier's People

Contributors

maciejdengusiak avatar michaldengusiak avatar ziolkowskijakub avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

sam_mollier's Issues

adjust load calculation logic for process

Describe the bug

adjust logic to:

$$ Q_{\text{total}} \ [\text{kW}] = \text{mass flow} \ [\text{kg/s}] \times (h_{P2} - h_{P1}) \ [\text{kJ/kg}] $$

$$ Q_{\text{sensible}} \ [\text{kW}] = \text{mass flow} \ [\text{kg/s}] \times cp \ [\text{kJ/kg}\cdot\text{°C}] \times (t_{P2} - t_{P1}) \ [\text{°C}] $$

$$ Q_{\text{latent}} \ [\text{kW}] = Q_{\text{total}} \ [\text{kW}] - Q_{\text{sensible}} \ [\text{kW}] $$

Steps to recreate the bug

Versions: Revit , Rhino

Screenshots

  1. Adjust in load calculation UI
    image

  2. also in GH
    image

Test file

explanation...
Where we have Cooling process - two points ie P1(35 degC, RH 55 %, x 19.59 g/kg, h 85.61 kJ/kg ) and P2(12 degC, 100%, x 8.73 g/kg, h 34.14 kJ/kg)
We have also mass flow m = 1 kg/s

we know that to calculate the total load for this Q total = Q sensible + Q latent

Q sensible = mass flow * cp * (T P2 - T P1)
Q sensible = 1 kg/s * 1.01 kJ/KgK * (12 degC - 35 degC)= -20.20 kW

Q latent = mass flow * r0 * (x P2 - x P1)
Q latent = 1 kg/s * 2.450 kJ/kgK * (8.73/1000 kg/kg - 19.59/1000 kg/kg)= -0.03 kW

we know that Q total = Q sensible + Q latent
Q total = -20.20 kW + (-0.03 kW) = -20.23 kW

However when I use the equation:
Q total = mass flow * (h P2 - h P1)
Q total = 1 kg/s * (34 kJ/kg - 85.61 kJ/kg) = -51.47 kW

so

The discrepancy you're observing in the total heat load (Q total) calculations for the air cooling process using the psychrometric properties arises due to a few key factors related to the nature of the calculations and the properties of air.

Specific Heat Capacity (cp) Variation: In your calculation of Q sensible, you've used a constant specific heat capacity (cp) value of 1.01 kJ/kgK. However, the specific heat of air is not constant and varies with temperature and moisture content. The value of cp used in your calculation might not accurately represent the specific heat of air at the conditions of P1 and P2.

Use of Approximate Formulas: The formula for Q latent assumes a linear relationship between the enthalpy and the humidity ratio, which might not be perfectly accurate over a wide range of conditions. This is because the enthalpy of moist air is a nonlinear function of both temperature and humidity ratio.

Accuracy of Psychrometric Data: The values for enthalpy (h) at points P1 and P2 are taken from a psychrometric chart or calculated using psychrometric equations. These values are subject to the accuracy of the chart or the equations used for their determination. Small errors in these values can lead to significant discrepancies in calculations, especially when dealing with large changes in temperature and humidity.

Difference in Calculation Methods: The method using sensible and latent heat separately (Q sensible + Q latent) and the method using enthalpy change (h P2 - h P1) are based on slightly different principles. The enthalpy method accounts for the total energy change, including both sensible and latent heat, in a more integrated manner. This method is often more accurate for processes involving both temperature and moisture content changes, which is typical in psychrometric applications.

To resolve this discrepancy, you may need to:

Use more accurate or variable-specific heat capacity values for air at different temperatures and humidity levels.
Employ more precise psychrometric equations or charts to determine the enthalpies at points P1 and P2.
Ensure that all psychrometric properties (temperature, relative humidity, specific humidity, enthalpy) are consistently and accurately determined.
In practice, the method using enthalpy differences is generally preferred for calculating the total heat load in psychrometric processes, especially when both temperature and humidity changes are involved.

add Node SAMMollier.ModifyProcessByBypassFactor

Describe the solution you'd like

Add new node:

SAMMollier.ModifyProcessByBypassFactor

Input:

- _process
- _bypassfactor_  (Default 1)

Output:

- mollierProcess
- end
- color
- epsilon

Additional context

Sometimes we allow air to bypass coil.

The term "bypass factor" in the context of Air Handling Units (AHU) and cooling coils refers to the fraction of air that does not come into contact with the cooling surfaces (like the fins of the coil) and hence does not get cooled. This concept is crucial in understanding the efficiency and performance of cooling systems.

Here we would use 0.33 which represet 33% of air. This means 66% of air goes via coil and 33% bypass
image

allow calculation for custom constants

Describe the solution you'd like

sometimes to adjust calculations according to specific conditions requirements to adjust constants are needed..

allow modification to :
https://github.com/HoareLea/SAM_Mollier/blob/master/SAM_Mollier/SAM.Core.Mollier/Variables/Zero.cs

when we query these values via Inspect.mollierPoint or:

- SAMMollier.Psychrometrics
- SAMMollier.LoadByProcess where we can connect optional input ( _cp_ use current default but allow modification)
- SAMMollier.CalculateLoads

Additional context

https://ninova.itu.edu.tr/en/courses/faculty-of-aeronautics-and-astronautics/965/uck-421/ekkaynaklar?g96162

input could be node:
SAMMollier.SpecificHeat

add

Describe the solution you'd like

describe assumption if design days not used
Additional context

image

fixes to SAMMollier.LoadByProcess

Describe the solution you'd like

  • 1. Add additional output to allow full information for process

new Output

MoistureGainsMassFlow [kg/s]
Condensation [l/h]
  • 2. also replace all output with capital to follow our naming
  • 3. when calculate load you should always subtract (t2-t1) so when cooling from (32-10) you have positive cooling load, maybe issue is with process please check

Additional context

image

test file attached
Issue48.zip

add Mollier chart

Describe the bug

Steps to recreate the bug

Versions: Revit , Rhino

Screenshots

Test file

Contact Factor for Cooling Process

Describe the bug
Contact Factor method for cooling process returns wrong value

Steps to recreate the bug

Versions: Revit , Rhino

Screenshots

Test file

unable to bake

Describe the bug

baking is not working any more

Steps to recreate the bug

Versions: Revit , Rhino

Screenshots

image

Test file

control of enthalpy lines

Describe the solution you'd like

allow filtering of enthalpy lines depends on the state: gas, fog, ice fog Default: Gas, enthalpy line to finish at saturation line, RH = 100%

image

Additional context

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.