jerell / fams Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://fams.vercel.app
Home Page: https://fams.vercel.app
Is your feature request related to a problem? Please describe.
Better defines the overall pressure drop calculation
Describe the solution you'd like
Additional equation to account for alongside the main (frictional loss) pressure drop calculation
P_elevation=gΔhρ
P_elevation = The additional pressure loss caused by elevation (no friction) [Pa] (calculated)
g= Acceleration due to gravity [m^2/s) (constant = 9.807)
Δh= Change in elevation [m] (model definition)
ρ= Density [kg/m^3] (calculated)
Δh (change in elevation) is defined h2 - h1, so end elevation minus initial elevation
P_final= P_frictionalloss (current output P2 from pressure drop calc) - P_elevation
P_final will replace P2, the final pressure out of the current calculation.
For logic or error checking, P_elevation should be positive if h2 is elevated higher than h1, therefore Δh is positive.
and P_elevation should be negative if h1 is elevated higher than h2, therefore Δh is negative.
Following this rule it is okay for cases where P_final ends up larger than P_frictionalloss
Happy to clarify any of this if it isn't clear
Initial pipeline will be Stanlow to Connah's Quay, we will need a node for each end to show input and output conditions. For this initial pipeline there will be a constant temperature but varying pressure (pressure drop calculation to follow).
Pipeline details:
Node details:
-Pressure: User input (units: Pa). This will be user input for Stanlow node and then calculated for the Connah's Quay node (calc to follow)
I tried to capture as much detail as possible with this to avoid having to add features retrospectively in the future, happy to discuss any of the points here or any changes you think would be good.
Thanks,
Matt
Is your feature request related to a problem? Please describe.
Update to inputs for the pressure drop calculation:
Describe the solution you'd like
f= 0.25/([log((ε/3.7D)+(5.74/(Re^0.7)))]^2)
f= friction factor
D= Diameter (m)
Re= Reynolds number
ε= roughness (m) (this will be provided as part of a model definition, but a value of 4.50E-05 can be used as a placeholder for a steel pipe)
Note on accuracy: The approximation from this equation can vary by 2.8% within its applicable range:
Hynet Model - UI needs to show:
Network - line diagram (as per slack channel)
Snapshot model -
Points of Interest -
pump
or compressor
; a negative pressure change is restriction
Is your feature request related to a problem? Please describe.
Previous pressure drop calculation given was too simplified
Describe the solution you'd like
The following pressure drop calculation relies on less assumptions for gas phase flow so should give a more accurate output.
Context
For reference here is the initial equation before rearrangement:
w^2=[(DA^2)/(vfL)]-[(P1^2-P2^2)/P1)
The rearrangement for P2 is as such:
P2=((√P1)√((A^2DP)-(fLv*w^2)))/A√D
(I can provide the non type text versions of these equations if that is clearer)
The terms for this equation are:
w= Mass flowrate [kg/s] (user input)
D= Diameter of pipe [m] (model definition)
A= Cross Sectional Area [m^2] (model definition)
v= Specific Volume [m^3/kg] (v=1/density)
f= Friction Factor (calculated, see below)
L= Pipe Length [m] (model definition)
P1= Initial Pressure [Pa] (user input)
P2= Final Pressure [Pa] (equation output)
The friction factor is dependent on the type of flow in the pipeline, this can be defined using Reynolds number:
Re=(ρuD)/μ
Re= Reynolds Number (equation output)
ρ= Density [kg/m^3] (calculated)
u= Velocity [m/s]
D= Diameter of pipe [m]
μ= Dynamic Viscosity [Pa.s]
Based on the value of Reynolds numbers one of two equations will be used for calculating friction factor.
If Re<2000 (Laminar) then use the following equation:
f=64/Re
f= Friction Factor
Re= Reynolds number
If Re>2000 (Transient/Turbulent) then use the following equation (Weymouth):
f=0.094/((D*1000)^1/3
f= Friction Factor
D= Diameter [m]
Notes on accuracy:
Assumptions that are taken for the basis on this formula:
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.