Changeset 17092
- Timestamp:
- 07/05/19 16:43:15 (5 years ago)
- Location:
- trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/AircraftLift.cs
r16565 r17092 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { 28 29 public class AircraftLift : ArtificialRegressionDataDescriptor { 29 public override string Name { get { return "Aircraft Lift Coefficient C_L = C_L a (a - a0) + C_Ld_e d_e S_HT / S_ref"; } }30 public override string Name { get { return "Aircraft Lift Coefficient C_L = C_Lα (α + α0) + C_Lδ_e δ_e S_HT / S_ref"; } } 30 31 31 32 public override string Description { … … 35 36 "modeling generalized separable systems\", Expert Systems with Applications, Volume 109, 2018, " + 36 37 "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine + 37 "Function: C_L = C_L a (a - a0) + C_Ld_e d_e S_HT / S_ref" + Environment.NewLine +38 " with C_La∈ [0.4, 0.8]," + Environment.NewLine +39 " a∈ [5°, 10°]," + Environment.NewLine +40 " C_Ld_e ∈ [0.4, 0.8]," + Environment.NewLine +41 " d_e ∈ [5°, 10°]," + Environment.NewLine +38 "Function: C_L = C_Lα (α - α0) + C_Lδ_e δ_e S_HT / S_ref" + Environment.NewLine + 39 "the lift coefficient of the main airfoil C_Lα ∈ [0.4, 0.8]," + Environment.NewLine + 40 "tha angle of attack α ∈ [5°, 10°]," + Environment.NewLine + 41 "the lift coefficient of the horizontal tail C_Lδ_e ∈ [0.4, 0.8]," + Environment.NewLine + 42 "δ_e ∈ [5°, 10°]," + Environment.NewLine + 42 43 "S_HT ∈ [1m², 1.5m²]," + Environment.NewLine + 43 44 "S_ref ∈ [5m², 7m²]," + Environment.NewLine + 44 " a0 is set to -2°";45 "the zero-lift angle of attack α0 is set to -2°"; 45 46 } 46 47 } 47 48 48 49 protected override string TargetVariable { get { return "C_L"; } } 49 protected override string[] VariableNames { get { return new string[] { "C_L a", "a", "a0", "C_Ld_e", "d_e", "S_HT", "C_L" }; } }50 protected override string[] AllowedInputVariables { get { return new string[] { "C_L a", "a", "a0", "C_Ld_e", "d_e", "S_HT" }; } }50 protected override string[] VariableNames { get { return new string[] { "C_Lα", "α", "α0", "C_Lδ_e", "δ_e", "S_HT", "C_L", "C_L_noise" }; } } 51 protected override string[] AllowedInputVariables { get { return new string[] { "C_Lα", "α", "α0", "C_Lδ_e", "δ_e", "S_HT" }; } } 51 52 protected override int TrainingPartitionStart { get { return 0; } } 52 53 protected override int TrainingPartitionEnd { get { return 100; } } … … 73 74 var S_ref = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5.0, 7.0).ToList(); 74 75 75 List<double> C_L = new List<double>(); 76 var C_L = new List<double>(); 77 var C_L_noise = new List<double>(); 76 78 data.Add(C_La); 77 79 data.Add(a); … … 81 83 data.Add(S_ref); 82 84 data.Add(C_L); 85 data.Add(C_L_noise); 83 86 84 87 double a0 = -2.0; 85 88 86 89 for (int i = 0; i < C_La.Count; i++) { 87 double C_Li = C_La[i] * (a[i] -a0) + C_Ld_e[i] * d_e[i] * S_HT[i] / S_ref[i];90 double C_Li = C_La[i] * (a[i] + a0) + C_Ld_e[i] * d_e[i] * S_HT[i] / S_ref[i]; 88 91 C_L.Add(C_Li); 89 92 } 93 94 95 var sigma_noise = 0.05 * C_L.StandardDeviationPop(); 96 C_L_noise.AddRange(C_L.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 90 97 91 98 return data; -
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs
r16565 r17092 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Random; 26 27 27 28 namespace HeuristicLab.Problems.Instances.DataAnalysis { 28 29 public class FluidDynamics : ArtificialRegressionDataDescriptor { 29 public override string Name { get { return " Flow Psi = V_inf r sin(th) (1 - R²/r²) + G/(2 π) ln(r/R)"; } }30 public override string Name { get { return "Spinning cylinder flow Ψ = V_∞ r sin(θ) (1 - R²/r²) + Γ/(2 π) ln(r/R)"; } } 30 31 31 32 public override string Description { … … 35 36 "modeling generalized separable systems\", Expert Systems with Applications, Volume 109, 2018, " + 36 37 "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine + 37 "Function: Psi = V_inf r sin(th) (1 - R²/r²) + G/(2 π) ln(r/R)" + Environment.NewLine + 38 "with V_inf ∈ [60 m/s, 65 m/s]," + Environment.NewLine + 39 "th ∈ [30°, 40°]," + Environment.NewLine + 40 "r ∈ [0.2m, 0.5m]," + Environment.NewLine + 41 "R ∈ [0.5m, 0.8m]," + Environment.NewLine + 42 "G ∈ [5 m²/s, 10 m²/s]"; 38 "Function: Ψ = V_∞ r sin(θ) (1 - R²/r²) + Γ/(2 π) ln(r/R)" + Environment.NewLine + 39 "with uniform stream velocity V_∞ ∈ [60 m/s, 65 m/s]," + Environment.NewLine + 40 "angle for polar coordinate vector field θ ∈ [30°, 40°]," + Environment.NewLine + 41 "radius for polar coordinate vector field r ∈ [0.5m, 0.8m]," + Environment.NewLine + 42 "radius of cylinder R ∈ [0.2m, 0.5m]," + Environment.NewLine + 43 "vortex strength (induced by spinning) Γ ∈ [5 m²/s, 10 m²/s]" + Environment.NewLine + 44 "Note: the definition deviates from the definition used in the source above because here we have r > R meaning we want to calculate the flow _outside_ of the cylinder."; 43 45 } 44 46 } 45 47 46 protected override string TargetVariable { get { return " Psi"; } }47 protected override string[] VariableNames { get { return new string[] { "V_ inf", "th", "r", "R", "G", "Psi" }; } }48 protected override string[] AllowedInputVariables { get { return new string[] { "V_ inf", "th", "r", "R", "G" }; } }48 protected override string TargetVariable { get { return "Ψ"; } } 49 protected override string[] VariableNames { get { return new string[] { "V_∞", "θ", "r", "R", "Γ", "Ψ", "Ψ_noise" }; } } 50 protected override string[] AllowedInputVariables { get { return new string[] { "V_∞", "θ", "r", "R", "Γ" }; } } 49 51 protected override int TrainingPartitionStart { get { return 0; } } 50 52 protected override int TrainingPartitionEnd { get { return 100; } } … … 66 68 var V_inf = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 60.0, 65.0).ToList(); 67 69 var th = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 30.0, 40.0).ToList(); 68 var r = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0. 2, 0.5).ToList();69 var R = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0. 5, 0.8).ToList();70 var r = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.5, 0.8).ToList(); 71 var R = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 0.2, 0.5).ToList(); 70 72 var G = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 5, 10).ToList(); 71 73 72 List<double> Psi = new List<double>(); 74 var Psi = new List<double>(); 75 var Psi_noise = new List<double>(); 76 73 77 data.Add(V_inf); 74 78 data.Add(th); … … 77 81 data.Add(G); 78 82 data.Add(Psi); 83 data.Add(Psi_noise); 79 84 80 85 for (int i = 0; i < V_inf.Count; i++) { … … 85 90 } 86 91 92 var sigma_noise = 0.05 * Psi.StandardDeviationPop(); 93 Psi_noise.AddRange(Psi.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 94 87 95 return data; 88 96 } -
trunk/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/RocketFuelFlow.cs
r16565 r17092 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Random; 26 27 … … 36 37 "Pages 25-34 https://doi.org/10.1016/j.eswa.2018.05.021. " + Environment.NewLine + 37 38 "Function: m_dot = p0 A / sqrt(T0) * sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1)))" + Environment.NewLine + 38 "with p0 ∈ [4e5 Pa, 6e5 Pa]," + Environment.NewLine +39 " A ∈ [0.5m², 1.5m²]," + Environment.NewLine +40 " T0 ∈ [250°K, 260°K]," + Environment.NewLine +41 " γ=1.4 and R=287 J/(kg*K)" + Environment.NewLine +42 "The factor sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1))) is constant asγ and R are constants.";39 "with total pressure p0 ∈ [4e5 Pa, 6e5 Pa]," + Environment.NewLine + 40 "cross-sectional area of the nozzle A ∈ [0.5m², 1.5m²]," + Environment.NewLine + 41 "total temperature T0 ∈ [250°K, 260°K]," + Environment.NewLine + 42 "specific heat capacity γ = 1.4 and gas constant R = 287 J/(kg*K)" + Environment.NewLine + 43 "The factor sqrt(γ/R (2/(γ+1))^((γ+1) / (γ-1))) is constant because γ and R are constants."; 43 44 } 44 45 } 45 46 46 47 protected override string TargetVariable { get { return "m_dot"; } } 47 protected override string[] VariableNames { get { return new string[] { "p0", "A", "T0", "m_dot" }; } }48 protected override string[] VariableNames { get { return new string[] { "p0", "A", "T0", "m_dot", "m_dot_noise" }; } } 48 49 protected override string[] AllowedInputVariables { get { return new string[] { "p0", "A", "T0" }; } } 49 50 protected override int TrainingPartitionStart { get { return 0; } } … … 68 69 var T0 = ValueGenerator.GenerateUniformDistributedValues(rand.Next(), TestPartitionEnd, 250.0, 260.0).ToList(); 69 70 70 List<double> m_dot = new List<double>(); 71 var m_dot = new List<double>(); 72 var m_dot_noise = new List<double>(); 71 73 data.Add(p0); 72 74 data.Add(A); 73 75 data.Add(T0); 74 76 data.Add(m_dot); 77 data.Add(m_dot_noise); 75 78 double R = 287.0; 76 79 double γ = 1.4; … … 81 84 } 82 85 86 var sigma_noise = 0.05 * m_dot.StandardDeviationPop(); 87 m_dot_noise.AddRange(m_dot.Select(md => md + NormalDistributedRandom.NextDouble(rand, 0, sigma_noise))); 83 88 return data; 84 89 }
Note: See TracChangeset
for help on using the changeset viewer.