public ViscosityAtLevelSet_FullySymmetric_withEvap(LevelSetTracker lstrk, double _muA, double _muB, double _penalty, int _component, double _rhoA, double _rhoB, ThermalParameters thermParams, double _Rint, double _sigma) { //double _kA, double _kB, double _hVapA, double _Rint, double _Tsat, double _sigma, double _pc) { this.m_LsTrk = lstrk; this.muA = _muA; this.muB = _muB; this.penalty = _penalty; this.component = _component; this.D = lstrk.GridDat.SpatialDimension; this.rhoA = _rhoA; this.rhoB = _rhoB; this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; //this.prescrbM = _prescrbM; }
public ViscosityAtLevelSet_FullySymmetric_withEvap(LevelSetTracker lstrk, double _muA, double _muB, double _penalty, int _component, ThermalParameters thermParams, double _sigma) : base(lstrk.GridDat.SpatialDimension, lstrk, thermParams, _sigma) { this.muA = _muA; this.muB = _muB; this.penalty = _penalty; this.component = _component; }
public HeatConvectionAtLevelSet_WithEvaporation(int _D, LevelSetTracker lsTrk, double _LFFA, double _LFFB, ThermalParameters thermParams, double _sigma) : base(_D, lsTrk, thermParams, _sigma) { this.LFFA = _LFFA; this.LFFB = _LFFB; this.capA = thermParams.c_A * thermParams.rho_A; this.capB = thermParams.c_B * thermParams.rho_B; }
public HeatConvectionAtLevelSet_Upwind(int _D, LevelSetTracker lsTrk, double _capA, double _capB, ThermalParameters thermParams, bool _movingmesh, bool _DiriCond, double _Tsat, double _sigma) : base(_D, lsTrk, thermParams, _sigma) { this.capA = thermParams.c_A * thermParams.rho_A; this.capB = thermParams.c_B * thermParams.rho_B; movingmesh = _movingmesh; DirichletCond = _DiriCond; }
/// <summary> /// clone /// </summary> public object Clone() { var cl = new ThermalParameters(); cl.rho_A = this.rho_A; cl.rho_B = this.rho_B; cl.c_A = this.c_A; cl.c_B = this.c_B; cl.k_A = this.k_A; cl.k_B = this.k_B; cl.Material = this.Material; return(cl); }
/// <summary> /// /// </summary> /// <param name="_d">spatial direction</param> /// <param name="_D">spatial dimension</param> /// <param name="LsTrk"></param> /// <param name="_sigma">surface-tension constant</param> public HeatFluxEvaporationAtLevelSet(LevelSetTracker LsTrk, double _rho, ThermalParameters thermParams, double _Rint, double _sigma) { m_LsTrk = LsTrk; this.rho = _rho; this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; this.D = LsTrk.GridDat.SpatialDimension; }
public EvaporationAtLevelSet(int _D, LevelSetTracker _LsTrk, ThermalParameters thermParams, double _sigma) { this.m_D = _D; this.m_LsTrk = _LsTrk; this.m_hVap = thermParams.hVap; this.m_rhoA = thermParams.rho_A; this.m_rhoB = thermParams.rho_B; this.m_pc = thermParams.pc; this.m_fc = thermParams.fc; this.m_Rc = thermParams.Rc; this.m_Tsat = thermParams.T_sat; this.m_sigma = _sigma; }
/// <summary> /// clone /// </summary> public object Clone() { var cl = new ThermalParameters(); cl.rho_A = this.rho_A; cl.rho_B = this.rho_B; cl.c_A = this.c_A; cl.c_B = this.c_B; cl.k_A = this.k_A; cl.k_B = this.k_B; cl.hVap = this.hVap; cl.T_sat = this.T_sat; cl.p_sat = this.p_sat; cl.fc = this.fc; cl.Rc = this.Rc; cl.pc = this.pc; return(cl); }
public ConvectionAtLevelSet_nonMaterialLLF(int _d, int _D, LevelSetTracker lsTrk, double _rhoA, double _rhoB, ThermalParameters thermParams, double _Rint, double _sigma) { //double _kA, double _kB, double _hVapA, double _Rint, double _Tsat, double _sigma, double _pc) { this.D = _D; this.m_d = _d; this.rhoA = _rhoA; this.rhoB = _rhoB; this.m_LsTrk = lsTrk; this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; //this.prescrbM = _prescrbM; }
/// <summary> /// prescribed volume flux for testing. /// </summary> //[DataMember] //public double prescribedVolumeFlux = 0.0; /// <summary> /// is the interface a material one or is it non-material? /// </summary> //[DataMember] //public bool Material = true; /// <summary> /// clone /// </summary> public object Clone() { var cl = new ThermalParameters(); cl.rho_A = this.rho_A; cl.rho_B = this.rho_B; cl.c_A = this.c_A; cl.c_B = this.c_B; cl.k_A = this.k_A; cl.k_B = this.k_B; cl.hVap_A = this.hVap_A; cl.hVap_B = this.hVap_B; cl.T_sat = this.T_sat; cl.p_sat = this.p_sat; cl.fc = this.fc; cl.Rc = this.Rc; //cl.Ac = this.Ac; cl.pc = this.pc; //cl.prescribedVolumeFlux = this.prescribedVolumeFlux; //cl.Material = this.Material; return(cl); }
public HeatConvectionAtLevelSet_Divergence(int _D, LevelSetTracker lsTrk, double _rhoA, double _rhoB, ThermalParameters thermParams, double _Rint, double _sigma, bool _DiriCond = true) { //double _kA, double _kB, double _hVapA, double _Rint, double _Tsat, double _sigma, double _pc) { this.D = _D; this.rhoA = _rhoA; this.rhoB = _rhoB; this.capA = thermParams.c_A * _rhoA; this.capB = thermParams.c_B * _rhoB; this.m_LsTrk = lsTrk; this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; this.DirichletCond = _DiriCond; }
public ConvectionAtLevelSet_nonMaterialLLF(int _d, int _D, LevelSetTracker lsTrk, ThermalParameters thermParams, double _sigma) : base(_D, lsTrk, thermParams, _sigma) { this.m_d = _d; }
public DivergenceAtLevelSet_withEvaporation(int _D, LevelSetTracker lsTrk, double vorZeichen, bool RescaleConti, ThermalParameters thermParams, double _sigma) : base(_D, lsTrk, thermParams, _sigma) { scaleA = vorZeichen; scaleB = vorZeichen; if (RescaleConti) { scaleA /= m_rhoA; scaleB /= m_rhoB; } }
public ConvectionAtLevelSet_Consistency(int _d, int _D, LevelSetTracker lsTrk, double _rhoA, double _rhoB, double vorZeichen, bool RescaleConti, ThermalParameters thermParams, double _Rint, double _sigma) { //double _kA, double _kB, double _hVapA, double _Rint, double _Tsat, double _sigma, double _pc) { this.D = _D; this.m_d = _d; this.rhoA = _rhoA; this.rhoB = _rhoB; this.m_LsTrk = lsTrk; scaleA = vorZeichen; scaleB = vorZeichen; if (RescaleConti) { scaleA /= rhoA; scaleB /= rhoB; } this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; //this.prescrbM = _prescrbM; }
/// <summary> /// /// </summary> /// <param name="_d">spatial direction</param> /// <param name="_D">spatial dimension</param> /// <param name="LsTrk"></param> public MassFluxAtInterface(int _d, int _D, LevelSetTracker LsTrk, double _rhoA, double _rhoB, ThermalParameters thermParams, double _Rint, double _sigma) { //double _kA, double _kB, double _hVapA, double _Rint, double _Tsat, double _sigma, double _pc) { m_LsTrk = LsTrk; if (_d >= _D) { throw new ArgumentOutOfRangeException(); } this.D = _D; this.m_d = _d; this.rhoA = _rhoA; this.rhoB = _rhoB; this.kA = thermParams.k_A; this.kB = thermParams.k_B; this.hVapA = thermParams.hVap_A; this.Rint = _Rint; this.Tsat = thermParams.T_sat; this.sigma = _sigma; this.pc = thermParams.pc; //this.prescrbM = _prescrbM; }
//============== // Heat equation //============== public static void AddSpeciesHeatEq(XSpatialOperatorMk2 XOp, IHeat_Configuration config, int D, string spcName, SpeciesId spcId, ThermalMultiphaseBoundaryCondMap BcMap, LevelSetTracker LsTrk) { // check input if (XOp.IsCommited) { throw new InvalidOperationException("Spatial Operator is already comitted. Adding of new components is not allowed"); } string CodName = EquationNames.HeatEquation; if (!XOp.CodomainVar.Contains(CodName)) { throw new ArgumentException("CoDomain variable \"" + CodName + "\" is not defined in Spatial Operator"); } if (config.getConductMode != ConductivityInSpeciesBulk.ConductivityMode.SIP) { foreach (string cn in EquationNames.AuxHeatFlux(D)) { if (!XOp.CodomainVar.Contains(cn)) { throw new ArgumentException("CoDomain variable \"" + cn + "\" is not defined in Spatial Operator"); } } } ThermalParameters thermParams = config.getThermParams; DoNotTouchParameters dntParams = config.getDntParams; // set species arguments double capSpc, LFFSpc, kSpc; switch (spcName) { case "A": { capSpc = thermParams.rho_A * thermParams.c_A; LFFSpc = dntParams.LFFA; kSpc = thermParams.k_A; break; } case "B": { capSpc = thermParams.rho_B * thermParams.c_B; LFFSpc = dntParams.LFFB; kSpc = thermParams.k_B; break; } default: throw new ArgumentException("Unknown species."); } // set components var comps = XOp.EquationComponents[CodName]; // convective part // ================ if (thermParams.IncludeConvection) { IEquationComponent conv; if (config.useUpwind) { conv = new HeatConvectionInSpeciesBulk_Upwind(D, BcMap, spcName, spcId, capSpc); } else { conv = new HeatConvectionInSpeciesBulk_LLF(D, BcMap, spcName, spcId, capSpc, LFFSpc, LsTrk); } comps.Add(conv); } // viscous operator (laplace) // ========================== if (config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.SIP) { double penalty = dntParams.PenaltySafety; var Visc = new ConductivityInSpeciesBulk( dntParams.UseGhostPenalties ? 0.0 : penalty, 1.0, BcMap, D, spcName, spcId, thermParams.k_A, thermParams.k_B); comps.Add(Visc); if (dntParams.UseGhostPenalties) { var ViscPenalty = new ConductivityInSpeciesBulk(penalty * 1.0, 0.0, BcMap, D, spcName, spcId, thermParams.k_A, thermParams.k_B); XOp.GhostEdgesOperator.EquationComponents[CodName].Add(ViscPenalty); } } else { comps.Add(new HeatFluxDivergenceInSpeciesBulk(D, BcMap, spcName, spcId)); //if (config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.LDGstabi) // comps.Add(new AuxiliaryStabilizationForm(D, BcMap, spcName, spcId)); for (int d = 0; d < D; d++) { comps = XOp.EquationComponents[EquationNames.AuxHeatFluxComponent(d)]; comps.Add(new AuxiliaryHeatFlux_Identity(d, spcName, spcId)); // cell local comps.Add(new TemperatureGradientInSpeciesBulk(D, d, BcMap, spcName, spcId, kSpc)); //if (config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.LDGstabi) // comps.Add(new TemperatureStabilizationForm(d, BcMap, spcName, spcId)); } } }
public static void AddInterfaceHeatEq(XSpatialOperatorMk2 XOp, IXHeat_Configuration config, int D, ThermalMultiphaseBoundaryCondMap BcMap, LevelSetTracker LsTrk) { // check input if (XOp.IsCommited) { throw new InvalidOperationException("Spatial Operator is already comitted. Adding of new components is not allowed"); } string CodName = EquationNames.HeatEquation; if (!XOp.CodomainVar.Contains(CodName)) { throw new ArgumentException("CoDomain variable \"" + CodName + "\" is not defined in Spatial Operator"); } if (config.getConductMode != ConductivityInSpeciesBulk.ConductivityMode.SIP) { foreach (string cn in EquationNames.AuxHeatFlux(D)) { if (!XOp.CodomainVar.Contains(cn)) { throw new ArgumentException("CoDomain variable \"" + cn + "\" is not defined in Spatial Operator"); } } } ThermalParameters thermParams = config.getThermParams; DoNotTouchParameters dntParams = config.getDntParams; // set species arguments double capA = thermParams.rho_A * thermParams.c_A; double LFFA = dntParams.LFFA; double kA = thermParams.k_A; double capB = thermParams.rho_B * thermParams.c_B; double LFFB = dntParams.LFFB; double kB = thermParams.k_B; double Tsat = thermParams.T_sat; // set components var comps = XOp.EquationComponents[CodName]; // convective part // ================ if (thermParams.IncludeConvection) { ILevelSetForm conv; conv = new HeatConvectionAtLevelSet_LLF(D, LsTrk, capA, capB, LFFA, LFFB, BcMap, config.isMovingMesh, Tsat); //conv = new HeatConvectionAtLevelSet_WithEvaporation(D, LsTrk, LFFA, LFFB, thermParams, config.getPhysParams.Sigma); //conv = new HeatConvectionAtLevelSet_Upwind(D, LsTrk, capA, capB, thermParams, config.isMovingMesh, config.isEvaporation, Tsat); comps.Add(conv); } // viscous operator (laplace) // ========================== if (config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.SIP) { double penalty = dntParams.PenaltySafety; var Visc = new ConductivityAtLevelSet(LsTrk, kA, kB, penalty * 1.0, Tsat); comps.Add(Visc); var qJump = new HeatFluxAtLevelSet(D, LsTrk, thermParams, config.getPhysParams.Sigma); comps.Add(qJump); } else { comps.Add(new HeatFluxDivergencetAtLevelSet(LsTrk)); //if(config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.LDGstabi) // comps.Add(new AuxiliaryStabilizationFormAtLevelSet(LsTrk, config.isEvaporation)); for (int d = 0; d < D; d++) { comps = XOp.EquationComponents[EquationNames.AuxHeatFluxComponent(d)]; comps.Add(new TemperatureGradientAtLevelSet(d, LsTrk, kA, kB, Tsat)); //if (config.getConductMode == ConductivityInSpeciesBulk.ConductivityMode.LDGstabi) // comps.Add(new TemperatureStabilizationFormAtLevelSet(d, LsTrk, kA, kB, config.isEvaporation, Tsat)); } } }
public HeatFluxAtLevelSet(int _D, LevelSetTracker _LsTrk, ThermalParameters thermParams, double _sigma) : base(_D, _LsTrk, thermParams, _sigma) { }
public ConvectionAtLevelSet_Consistency(int _d, int _D, LevelSetTracker lsTrk, double vorZeichen, bool RescaleConti, ThermalParameters thermParams, double _sigma) : base(_D, lsTrk, thermParams, _sigma) { this.m_d = _d; scaleA = vorZeichen; scaleB = vorZeichen; if (RescaleConti) { scaleA /= m_rhoA; scaleB /= m_rhoB; } }