/// <summary> /// /// </summary> /// <param name="XOp"></param> /// <param name="config"></param> /// <param name="d"></param> /// <param name="D"></param> /// <param name="BcMap"></param> /// <param name="LsTrk"></param> public static void AddInterfaceConstitutive_component(XSpatialOperatorMk2 XOp, IRheology_Configuration config, int d, int D, IncompressibleMultiphaseBoundaryCondMap BcMap, LevelSetTracker LsTrk, out bool U0meanrequired) { // check input if (XOp.IsCommited) { throw new InvalidOperationException("Spatial Operator is already comitted. Adding of new components is not allowed"); } string CodName; if (d == 0) { CodName = EquationNames.ConstitutiveXX; } else if (d == 1) { CodName = EquationNames.ConstitutiveXY; } else if (d == 2) { CodName = EquationNames.ConstitutiveYY; } else { throw new NotSupportedException("Invalid index (3D not supported), d is: " + d); } if (!XOp.CodomainVar.Contains(CodName)) { throw new ArgumentException("CoDomain variable \"" + CodName + "\" is not defined in Spatial Operator"); } PhysicalParameters physParams = config.getPhysParams; DoNotTouchParameters dntParams = config.getDntParams; // set components var comps = XOp.EquationComponents[CodName]; // identity part: local variable, therefore no contribution at interface! // =================== U0meanrequired = false; if (config.isOldroydB) { // convective operator // =================== var convective = new ConvectiveAtLevelSet(LsTrk, d, physParams.Weissenberg_a, physParams.Weissenberg_b, dntParams.alpha); comps.Add(convective); U0meanrequired = true; // objective operator // =================== var objective = new ObjectiveAtLevelSet(LsTrk, d, physParams.Weissenberg_a, physParams.Weissenberg_b); comps.Add(objective); } // viscous operator // ================== var viscosity = new ViscosityAtLevelSet(LsTrk, d, physParams.beta_a, physParams.beta_b, dntParams.Penalty1, dntParams.UseWeightedAverages); comps.Add(viscosity); }
/// <summary> /// /// </summary> /// <param name="XOp"></param> /// <param name="config"></param> /// <param name="d"></param> /// <param name="D"></param> /// <param name="BcMap"></param> /// <param name="LsTrk"></param> public static void AddInterfaceConstitutive_component(XSpatialOperatorMk2 XOp, IXNSE_Configuration config, int d, int D, IncompressibleMultiphaseBoundaryCondMap 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; if (d == 0) { CodName = EquationNames.ConstitutiveXX; } else if (d == 1) { CodName = EquationNames.ConstitutiveXY; } else if (d == 2) { CodName = EquationNames.ConstitutiveYY; } else { throw new NotSupportedException("Invalid index (3D not supported), d is: " + d); } if (!XOp.CodomainVar.Contains(CodName)) { throw new ArgumentException("CoDomain variable \"" + CodName + "\" is not defined in Spatial Operator"); } PhysicalParameters physParams = config.getPhysParams; DoNotTouchParameters dntParams = config.getDntParams; // set species arguments //double rhoA = physParams.rho_A; //double rhoB = physParams.rho_B; //double LFFA = dntParams.LFFA; //double LFFB = dntParams.LFFB; //double muA = physParams.mu_A; //double muB = physParams.mu_B; // set components var comps = XOp.EquationComponents[CodName]; // identity part // =================== var identity = new IdentityAtLevelSet(LsTrk, d); comps.Add(identity); // viscous operator // ================== var viscosity = new ViscosityAtLevelSet(LsTrk, d, physParams.beta_a, physParams.beta_b, dntParams.Penalty1); comps.Add(viscosity); }