-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/100prznt/FlowCalc
- Loading branch information
Showing
6 changed files
with
135 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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,42 @@ | ||
using FlowCalc.PoolSystem; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FlowCalc.PoolSystem | ||
{ | ||
public class Filter : PipeBase | ||
{ | ||
#region Properties | ||
|
||
#endregion Properties | ||
|
||
#region Services | ||
|
||
/// <summary> | ||
/// Druckverlust berechnen | ||
/// </summary> | ||
/// <param name="medium">Stoffdaten</param> | ||
/// <param name="flowRate">Volumenstrom in [m^3/h]</param> | ||
/// <returns>Druckverlust in [bar]</returns> | ||
public double CalcPressureDrop(Medium medium, double flowRate) | ||
{ | ||
var pd = double.NaN; //Druckverlust | ||
var zeta = double.NaN; //Widerstandsbeiwert | ||
var rho = medium.Density; //Dichte | ||
var w = double.NaN; //mittlere effektive Fluidgeschwindigkeit | ||
var h = double.NaN; //Höhe der Schicht | ||
var dh = double.NaN; //hydraulischer Durchmesser | ||
|
||
|
||
|
||
pd = zeta * (rho / 2) * Math.Pow(w, 2) * (h / dh); | ||
|
||
return pd; | ||
} | ||
|
||
#endregion Services | ||
} | ||
} |
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
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,89 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace FlowCalc.PoolSystem | ||
{ | ||
public class PipeBase | ||
{ | ||
#region Properties | ||
/// <summary> | ||
/// Innerer Rohrdurchmesser | ||
/// in [mm] | ||
/// </summary> | ||
public double Diameter { get; set; } | ||
|
||
/// <summary> | ||
/// Rohrlänge | ||
/// in [m] | ||
/// </summary> | ||
public double Length { get; set; } | ||
|
||
/// <summary> | ||
/// Rohrquerschnitt | ||
/// in mm^2 | ||
/// </summary> | ||
public double CrossArea | ||
{ | ||
get | ||
{ | ||
return Math.PI * Math.Pow(Diameter, 2) / 4; | ||
} | ||
} | ||
|
||
#endregion Properties | ||
|
||
#region Constructor | ||
/// <summary> | ||
/// Konstruktor | ||
/// </summary> | ||
public PipeBase() | ||
{ | ||
|
||
} | ||
|
||
/// <summary> | ||
/// Konstruktor | ||
/// </summary> | ||
/// <param name="l">Rohrlänge in [m]</param> | ||
/// <param name="di">Innerer Rohrdurchmesser in [mm]</param> | ||
public PipeBase(double l, double di) | ||
{ | ||
Length = l; | ||
Diameter = di; | ||
} | ||
|
||
#endregion Constructor | ||
|
||
#region Services | ||
/// <summary> | ||
/// Strömungsgeschwindigkeit berechnen | ||
/// </summary> | ||
/// <param name="flowRate">Volumenstrom in [m^3/h]</param> | ||
/// <returns>Strömungsgeschwindigkeit in [m/s]</returns> | ||
public double CalcFlowVelocity(double flowRate) | ||
{ | ||
double q = flowRate / 3600; // [m^3/s] | ||
double a = CrossArea / 1E6; // [m^2] | ||
|
||
return q / a; | ||
} | ||
|
||
/// <summary> | ||
/// Volumenstrom berechnen | ||
/// </summary> | ||
/// <param name="flowVelocity">Strömungsgeschwindigkeit in [m/s]</param> | ||
/// <returns>Volumenstrom in [m^3/h]</returns> | ||
public double CalcFlowRate(double flowVelocity) | ||
{ | ||
double a = CrossArea / 1E6; // [m^2] | ||
double q = flowVelocity * a; // [m^3/s] | ||
|
||
return q * 3600; | ||
} | ||
|
||
#endregion Services | ||
} | ||
} |