Skip to content

Commit

Permalink
Erweiterung Systemberechnung
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias Ruemmler committed Mar 7, 2019
1 parent d2fa87a commit e0adada
Show file tree
Hide file tree
Showing 13 changed files with 543 additions and 51 deletions.
6 changes: 6 additions & 0 deletions FlowCalc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.28307.168
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowCalc", "FlowCalc\FlowCalc.csproj", "{43E44C73-0DB7-478D-8766-BD1D884D3090}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlowCalc_Test", "FlowCalc_Test\FlowCalc_Test.csproj", "{81F19295-D779-4FF4-AC3E-90360E7360B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -15,6 +17,10 @@ Global
{43E44C73-0DB7-478D-8766-BD1D884D3090}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43E44C73-0DB7-478D-8766-BD1D884D3090}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43E44C73-0DB7-478D-8766-BD1D884D3090}.Release|Any CPU.Build.0 = Release|Any CPU
{81F19295-D779-4FF4-AC3E-90360E7360B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81F19295-D779-4FF4-AC3E-90360E7360B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81F19295-D779-4FF4-AC3E-90360E7360B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81F19295-D779-4FF4-AC3E-90360E7360B2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 5 additions & 1 deletion FlowCalc/FlowCalc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@
</Compile>
<Compile Include="Mathematics\CheckRoutines.cs" />
<Compile Include="Mathematics\LinInterp.cs" />
<Compile Include="PoolSystem\Elbow.cs" />
<Compile Include="PoolSystem\FittingDetailAttribute.cs" />
<Compile Include="PoolSystem\Fittings.cs" />
<Compile Include="PoolSystem\Medium.cs" />
<Compile Include="PoolSystem\Pipe.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Pump.cs" />
<Compile Include="PumpPerformancePoint.cs" />
<Compile Include="PoolSystem\Fitting.cs" />
<Compile Include="PoolSystem\BaseFitting.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
Expand Down
36 changes: 36 additions & 0 deletions FlowCalc/PoolSystem/BaseFitting.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlowCalc.PoolSystem
{
/// <summary>
/// Rohrbogen
/// </summary>
public abstract class BaseFitting
{
/// <summary>
/// Name der Armatur bzw. des Formstückes
/// </summary>
public string Name { get; set; }

/// <summary>
/// Innendurchmesser
/// in [mm]
/// </summary>
public double Diameter { get; set; }

/// <summary>
/// Rohrrauheit
/// in [mm]
/// </summary>
public double Roughness { get; set; }

/// <summary>
/// Druckverlustbeiwert
/// </summary>
public abstract double Zeta { get; }
}
}
71 changes: 71 additions & 0 deletions FlowCalc/PoolSystem/Elbow.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlowCalc.PoolSystem
{
public class Elbow : BaseFitting
{
#region Member


#endregion Member

#region Properties
/// <summary>
/// Mittlerer Krümmungsradius des Rohrbogens
/// in [mm]
/// </summary>
public double Radius { get; set; }

/// <summary>
/// Krümmungswinkel des Rohrbogens
/// in [Grad]
/// </summary>
public double Angle { get; set; }

/// <summary>
/// Druckverlustbeiwert
/// </summary>
public override double Zeta
{
get
{
var x = Radius / Diameter;
if (x < 1 || x > 10)
throw new IndexOutOfRangeException("Gültigkeitsbereich für Zeta-Berechnung verletzt!");

return 0;
}
}
#endregion Properties

#region Constructor
/// <summary>
/// Empty constructor for Elbow
/// </summary>
public Elbow()
{

}

#endregion Constructor

#region Services


#endregion Services

#region Internal services


#endregion Internal services

#region Events


#endregion Events
}
}
47 changes: 0 additions & 47 deletions FlowCalc/PoolSystem/Fitting.cs

This file was deleted.

28 changes: 28 additions & 0 deletions FlowCalc/PoolSystem/FittingDetailAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlowCalc.PoolSystem
{
[AttributeUsage(AttributeTargets.Field)]
public class FittingDetailAttribute : Attribute
{
public string DisplayName { get; set; }

public int NominalDiameter { get; set; }

public double InnerDiameter { get; set; }

public double Zeta { get; set; }

public FittingDetailAttribute(string name, int dn, double zeta, double diameter)
{
DisplayName = name;
NominalDiameter = dn;
Zeta = zeta;
InnerDiameter = diameter;
}
}
}
21 changes: 21 additions & 0 deletions FlowCalc/PoolSystem/Fittings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FlowCalc.PoolSystem
{
public enum Fittings
{
[FittingDetail("Bogen 90°", 40, 0.191, 42.6)]
Dn40Elbow90,
[FittingDetail("Winkel 90°", 40, 0.565, 50)]
Dn40Angle90,
[FittingDetail("Winkel 45°", 40, 0.565, 50)]
Dn40Angle45,
Dn40TPipe90,
Dn40TPipe45,
Dn40YPipe
}
}
Loading

0 comments on commit e0adada

Please sign in to comment.