Changeset 17226 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs
- Timestamp:
- 08/29/19 15:57:35 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.Instances.DataAnalysis merged: 17092-17094,17150,17180,17184
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Physics/FluidDynamics.cs
r16565 r17226 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.