void SetBndfunction(string S) { int D = base.m_D; base.tempFunction = this.m_bcMap.bndFunction[VariableNames.Temperature + "#" + S]; base.fluxFunction = D.ForLoop(d => m_bcMap.bndFunction[VariableNames.HeatFluxVectorComponent(d) + "#" + S]); }
public ConductivityInSpeciesBulk(double penalty, double sw, ThermalMultiphaseBoundaryCondMap bcMap, int D, string spcName, SpeciesId spcId, double _kA, double _kB) : base(penalty, D, bcMap) { base.m_alpha = sw; this.m_bcMap = bcMap; this.m_spcId = spcId; ValidSpecies = spcName; switch (spcName) { case "A": currentk = _kA; complementk = _kB; break; case "B": currentk = _kB; complementk = _kA; break; default: throw new ArgumentException("Unknown species."); } double muFactor = Math.Max(currentk, complementk) / currentk; base.m_penalty_base = penalty * muFactor; base.tempFunction = this.m_bcMap.bndFunction[VariableNames.Temperature + "#" + spcName]; base.fluxFunction = D.ForLoop(d => bcMap.bndFunction[VariableNames.HeatFluxVectorComponent(d) + "#" + spcName]); }
public swipConductivity(double _penaltyBase, int D, ThermalBoundaryCondMap bcmap) { this.m_penalty_base = _penaltyBase; this.m_D = D; tempFunction = bcmap.bndFunction[VariableNames.Temperature]; fluxFunction = D.ForLoop(d => bcmap.bndFunction[VariableNames.HeatFluxVectorComponent(d)]); EdgeTag2Type = bcmap.EdgeTag2Type; }
public AuxiliaryStabilizationForm(int _D, ThermalMultiphaseBoundaryCondMap bcMap, string spcName, SpeciesId spcId) { this.m_D = _D; EdgeTag2Type = bcMap.EdgeTag2Type; fluxFunction = m_D.ForLoop(d => bcMap.bndFunction[VariableNames.HeatFluxVectorComponent(d) + "#" + spcName]); this.m_spcId = spcId; //this.ksqrt = Math.Sqrt(_k); }
public HeatFluxDivergenceInSpeciesBulk(int D, ThermalMultiphaseBoundaryCondMap bcMap, string spcName, SpeciesId spcId) { this.m_D = D; this.m_spcId = spcId; //this.ksqrt = Math.Sqrt(_k); fluxFunction = D.ForLoop(d => bcMap.bndFunction[VariableNames.HeatFluxVectorComponent(d) + "#" + spcName]); EdgeTag2Type = bcMap.EdgeTag2Type; }
public ThermalMultiphaseBoundaryCondMap(IGridData f, IDictionary <string, BoSSS.Solution.Control.AppControl.BoundaryValueCollection> b, string[] SpeciesNames) : base(f, b, BndFunctions(f, SpeciesNames)) // { string S0 = "#" + SpeciesNames[0]; int D = f.SpatialDimension; for (int d = 0; d < D; d++) { base.bndFunction.Add(VariableNames.HeatFluxVectorComponent(d), base.bndFunction[VariableNames.HeatFluxVectorComponent(d) + S0]); base.bndFunction.Add(VariableNames.Velocity_d(d), base.bndFunction[VariableNames.Velocity_d(d) + S0]); } base.bndFunction.Add(VariableNames.Temperature, base.bndFunction[VariableNames.Temperature + S0]); //base.bndFunction.Add("HeatFlux", base.bndFunction["HeatFlux" + S0]); }
static string[] BndFunctions(IGridData g, string[] SpeciesNames) { int D = g.SpatialDimension; List <string> scalarFields = new List <string>(); foreach (var S in SpeciesNames) { for (int d = 0; d < D; d++) { scalarFields.Add(VariableNames.HeatFluxVectorComponent(d) + "#" + S); scalarFields.Add(VariableNames.Velocity_d(d) + "#" + S); } scalarFields.Add(VariableNames.Temperature + "#" + S); //scalarFields.Add("HeatFlux" + "#" + S); } return(scalarFields.ToArray()); }
#pragma warning restore 649 /// <summary> /// creates heat equation related fields /// </summary> public void CreateHeatFields() { int D = this.GridData.SpatialDimension; this.Temperature = new XDGField(new XDGBasis(this.LsTrk, this.Control.FieldOptions[VariableNames.Temperature].Degree), VariableNames.Temperature); base.RegisterField(this.Temperature); this.ResidualHeat = new XDGField(this.Temperature.Basis, "ResidualHeat"); base.RegisterField(this.ResidualHeat); this.HeatFlux = new VectorField <XDGField>(D.ForLoop(d => new XDGField(new XDGBasis(this.LsTrk, this.Control.FieldOptions[VariableNames.HeatFluxVectorComponent(d)].Degree), VariableNames.HeatFluxVectorComponent(d)))); base.RegisterField(this.HeatFlux); if (this.Control.conductMode != ConductivityInSpeciesBulk.ConductivityMode.SIP) { this.ResidualAuxHeatFlux = new VectorField <XDGField>(D.ForLoop(d => new XDGField(new XDGBasis(this.LsTrk, this.Control.FieldOptions[VariableNames.HeatFluxVectorComponent(d)].Degree), VariableNames.ResidualAuxHeatFluxVectorComponent(d)))); base.RegisterField(this.ResidualAuxHeatFlux); } this.DisjoiningPressure = new SinglePhaseField(new Basis(this.GridData, this.Control.FieldOptions[VariableNames.Pressure].Degree), "DisjoiningPressure"); if (this.Control.DisjoiningPressureFunc != null) { DisjoiningPressure.ProjectField(this.Control.DisjoiningPressureFunc); } base.RegisterField(this.DisjoiningPressure); }