diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 64be5736bca..c5bd653b04a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5610,9 +5610,8 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i /*--- Define some variables for flamelet model. ---*/ if (Kind_Species_Model == SPECIES_MODEL::FLAMELET) { /*--- The controlling variables are progress variable, total enthalpy, and optionally mixture fraction ---*/ - //n_control_vars = nSpecies - n_user_scalars; if (n_control_vars != (nSpecies - n_user_scalars)) - SU2_MPI::Error("Number of initial species incompatbile with number of controlling variables and user scalars.", CURRENT_FUNCTION); + SU2_MPI::Error("Number of initial species incompatible with number of controlling variables and user scalars.", CURRENT_FUNCTION); /*--- We can have additional user defined transported scalars ---*/ n_scalars = n_control_vars + n_user_scalars; } @@ -5620,6 +5619,7 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i if (Kind_Regime == ENUM_REGIME::COMPRESSIBLE && GetBounded_Scalar()) { SU2_MPI::Error("BOUNDED_SCALAR discretization can only be used for incompressible problems.", CURRENT_FUNCTION); } + } void CConfig::SetMarkers(SU2_COMPONENT val_software) { diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp index 8c5bfddf39e..c3c600e8a12 100644 --- a/Common/src/geometry/CMultiGridGeometry.cpp +++ b/Common/src/geometry/CMultiGridGeometry.cpp @@ -36,8 +36,8 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un /*--- Create a queue system to do the agglomeration 1st) More than two markers ---> Vertices (never agglomerate) 2nd) Two markers ---> Edges (agglomerate if same BC, never agglomerate if different BC) - 3rd) One marker ---> Surface (always agglomarate) - 4th) No marker ---> Internal Volume (always agglomarate) ---*/ + 3rd) One marker ---> Surface (always agglomerate) + 4th) No marker ---> Internal Volume (always agglomerate) ---*/ /*--- Set a marker to indicate indirect agglomeration, for quads and hexs, i.e. consider up to neighbors of neighbors of neighbors. diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index e89955b4f68..01626563d40 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6882,7 +6882,6 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { unsigned short iDim; - unsigned long iVertex, iPoint; su2double P_Total, T_Total, Velocity[MAXNDIM], Velocity2, H_Total, Temperature, Riemann, Pressure, Density, Energy, Flow_Dir[MAXNDIM], Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag, alpha, aa, bb, cc, dd, Area, UnitNormal[MAXNDIM], Normal[MAXNDIM]; @@ -6891,290 +6890,259 @@ void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); const su2double Two_Gamma_M1 = 2.0 / Gamma_Minus_One; const su2double Gas_Constant = config->GetGas_ConstantND(); - const auto Kind_Inlet = config->GetKind_Inlet(); + const auto Kind_Inlet_Cfg = config->GetKind_Inlet(); const auto Marker_Tag = config->GetMarker_All_TagBound(val_marker); const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST); /*--- Loop over all the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++) { + for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { /*--- Allocate the value at the inlet ---*/ V_inlet = GetCharacPrimVar(val_marker, iVertex); - iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); /*--- Check if the node belongs to the domain (i.e., not a halo node) ---*/ - if (geometry->nodes->GetDomain(iPoint)) { - - /*--- Normal vector for this vertex (negate for outward convention) ---*/ + if (!geometry->nodes->GetDomain(iPoint)) continue; - geometry->vertex[val_marker][iVertex]->GetNormal(Normal); - for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - conv_numerics->SetNormal(Normal); + /*--- Normal vector for this vertex (negate for outward convention) ---*/ - Area = GeometryToolbox::Norm(nDim, Normal); - for (iDim = 0; iDim < nDim; iDim++) - UnitNormal[iDim] = Normal[iDim]/Area; + geometry->vertex[val_marker][iVertex]->GetNormal(Normal); + for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + conv_numerics->SetNormal(Normal); - /*--- Retrieve solution at this boundary node ---*/ + Area = GeometryToolbox::Norm(nDim, Normal); + for (iDim = 0; iDim < nDim; iDim++) + UnitNormal[iDim] = Normal[iDim]/Area; - V_domain = nodes->GetPrimitive(iPoint); + /*--- Retrieve solution at this boundary node ---*/ - /*--- Build the fictitious intlet state based on characteristics ---*/ + V_domain = nodes->GetPrimitive(iPoint); + /*--- On intersections with viscous walls we set the total conditions equal to + the static conditions of the wall point. This avoids a jump in pressure, + energy, etc. at this location. ---*/ - /*--- Subsonic inflow: there is one outgoing characteristic (u-c), - therefore we can specify all but one state variable at the inlet. - The outgoing Riemann invariant provides the final piece of info. - Adapted from an original implementation in the Stanford University - multi-block (SUmb) solver in the routine bcSubsonicInflow.f90 - written by Edwin van der Weide, last modified 04-20-2009. ---*/ + const auto Kind_Inlet = geometry->nodes->GetViscousBoundary(iPoint) + ? INLET_TYPE::TOTAL_CONDITIONS : Kind_Inlet_Cfg; - switch (Kind_Inlet) { + /*--- Build the fictitious inlet state based on characteristics ---*/ - /*--- Total properties have been specified at the inlet. ---*/ + /*--- Subsonic inflow: there is one outgoing characteristic (u-c), + therefore we can specify all but one state variable at the inlet. + The outgoing Riemann invariant provides the final piece of info. + Adapted from an original implementation in the Stanford University + multi-block (SUmb) solver in the routine bcSubsonicInflow.f90 + written by Edwin van der Weide, last modified 04-20-2009. ---*/ - case INLET_TYPE::TOTAL_CONDITIONS: { + switch (Kind_Inlet) { - /*--- Retrieve the specified total conditions for this inlet. ---*/ + /*--- Total properties have been specified at the inlet. ---*/ - P_Total = Inlet_Ptotal[val_marker][iVertex]; - T_Total = Inlet_Ttotal[val_marker][iVertex]; - const su2double* dir = Inlet_FlowDir[val_marker][iVertex]; - const su2double mag = GeometryToolbox::Norm(nDim, dir); - for (iDim = 0; iDim < nDim; iDim++) { - Flow_Dir[iDim] = dir[iDim] / mag; - } + case INLET_TYPE::TOTAL_CONDITIONS: { - /*--- Non-dim. the inputs if necessary. ---*/ + /*--- Retrieve the specified total conditions for this inlet. ---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); + P_Total = Inlet_Ptotal[val_marker][iVertex]; + T_Total = Inlet_Ttotal[val_marker][iVertex]; + const su2double* dir = Inlet_FlowDir[val_marker][iVertex]; + const su2double mag = GeometryToolbox::Norm(nDim, dir); + for (iDim = 0; iDim < nDim; iDim++) { + Flow_Dir[iDim] = dir[iDim] / mag; + } - /*--- Store primitives and set some variables for clarity. ---*/ + /*--- Non-dim. the inputs if necessary. ---*/ - Density = V_domain[nDim+2]; - Velocity2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { - Velocity[iDim] = V_domain[iDim+1]; - Velocity2 += Velocity[iDim]*Velocity[iDim]; - } - Energy = V_domain[nDim+3] - V_domain[nDim+1]/V_domain[nDim+2]; - Pressure = V_domain[nDim+1]; - H_Total = (Gamma*Gas_Constant/Gamma_Minus_One)*T_Total; - SoundSpeed2 = Gamma*Pressure/Density; + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); - /*--- Compute the acoustic Riemann invariant that is extrapolated - from the domain interior. ---*/ + if (geometry->nodes->GetViscousBoundary(iPoint)) { + P_Total = nodes->GetPressure(iPoint); + T_Total = nodes->GetTemperature(iPoint); + } - Riemann = 2.0*sqrt(SoundSpeed2)/Gamma_Minus_One; - for (iDim = 0; iDim < nDim; iDim++) - Riemann += Velocity[iDim]*UnitNormal[iDim]; + /*--- Store primitives and set some variables for clarity. ---*/ - /*--- Total speed of sound ---*/ + Density = V_domain[nDim+2]; + Velocity2 = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { + Velocity[iDim] = V_domain[iDim+1]; + Velocity2 += Velocity[iDim]*Velocity[iDim]; + } + Energy = V_domain[nDim+3] - V_domain[nDim+1]/V_domain[nDim+2]; + Pressure = V_domain[nDim+1]; + H_Total = (Gamma*Gas_Constant/Gamma_Minus_One)*T_Total; + SoundSpeed2 = Gamma*Pressure/Density; - SoundSpeed_Total2 = Gamma_Minus_One*(H_Total - (Energy + Pressure/Density)+0.5*Velocity2) + SoundSpeed2; + /*--- Compute the acoustic Riemann invariant that is extrapolated + from the domain interior. ---*/ - /*--- Dot product of normal and flow direction. This should - be negative due to outward facing boundary normal convention. ---*/ + Riemann = 2.0*sqrt(SoundSpeed2)/Gamma_Minus_One; + for (iDim = 0; iDim < nDim; iDim++) + Riemann += Velocity[iDim]*UnitNormal[iDim]; - alpha = 0.0; - for (iDim = 0; iDim < nDim; iDim++) - alpha += UnitNormal[iDim]*Flow_Dir[iDim]; + /*--- Total speed of sound ---*/ - /*--- Coefficients in the quadratic equation for the velocity ---*/ + SoundSpeed_Total2 = Gamma_Minus_One*(H_Total - (Energy + Pressure/Density)+0.5*Velocity2) + SoundSpeed2; - aa = 1.0 + 0.5*Gamma_Minus_One*alpha*alpha; - bb = -1.0*Gamma_Minus_One*alpha*Riemann; - cc = 0.5*Gamma_Minus_One*Riemann*Riemann - -2.0*SoundSpeed_Total2/Gamma_Minus_One; + /*--- Dot product of normal and flow direction. This should + be negative due to outward facing boundary normal convention. ---*/ - /*--- Solve quadratic equation for velocity magnitude. Value must - be positive, so the choice of root is clear. ---*/ + alpha = 0.0; + for (iDim = 0; iDim < nDim; iDim++) + alpha += UnitNormal[iDim]*Flow_Dir[iDim]; - dd = bb*bb - 4.0*aa*cc; - dd = sqrt(max(0.0, dd)); - Vel_Mag = (-bb + dd)/(2.0*aa); - Vel_Mag = max(0.0, Vel_Mag); - Velocity2 = Vel_Mag*Vel_Mag; + /*--- Coefficients in the quadratic equation for the velocity ---*/ - /*--- Compute speed of sound from total speed of sound eqn. ---*/ + aa = 1.0 + 0.5*Gamma_Minus_One*alpha*alpha; + bb = -1.0*Gamma_Minus_One*alpha*Riemann; + cc = 0.5*Gamma_Minus_One*Riemann*Riemann + -2.0*SoundSpeed_Total2/Gamma_Minus_One; - SoundSpeed2 = SoundSpeed_Total2 - 0.5*Gamma_Minus_One*Velocity2; + /*--- Solve quadratic equation for velocity magnitude. Value must + be positive, so the choice of root is clear. ---*/ - /*--- Mach squared (cut between 0-1), use to adapt velocity ---*/ + dd = bb*bb - 4.0*aa*cc; + dd = sqrt(max(0.0, dd)); + Vel_Mag = (-bb + dd)/(2.0*aa); + Vel_Mag = max(0.0, Vel_Mag); + Velocity2 = Vel_Mag*Vel_Mag; - Mach2 = Velocity2/SoundSpeed2; - Mach2 = min(1.0, Mach2); - Velocity2 = Mach2*SoundSpeed2; - Vel_Mag = sqrt(Velocity2); - SoundSpeed2 = SoundSpeed_Total2 - 0.5*Gamma_Minus_One*Velocity2; + /*--- Compute speed of sound from total speed of sound eqn. ---*/ - /*--- Compute new velocity vector at the inlet ---*/ + SoundSpeed2 = SoundSpeed_Total2 - 0.5*Gamma_Minus_One*Velocity2; - for (iDim = 0; iDim < nDim; iDim++) - Velocity[iDim] = Vel_Mag*Flow_Dir[iDim]; + /*--- Mach squared (cut between 0-1), use to adapt velocity ---*/ - /*--- Static temperature from the speed of sound relation ---*/ + Mach2 = Velocity2/SoundSpeed2; + Mach2 = min(1.0, Mach2); + Velocity2 = Mach2*SoundSpeed2; + Vel_Mag = sqrt(Velocity2); + SoundSpeed2 = SoundSpeed_Total2 - 0.5*Gamma_Minus_One*Velocity2; - Temperature = SoundSpeed2/(Gamma*Gas_Constant); + /*--- Compute new velocity vector at the inlet ---*/ - /*--- Static pressure using isentropic relation at a point ---*/ + for (iDim = 0; iDim < nDim; iDim++) + Velocity[iDim] = Vel_Mag*Flow_Dir[iDim]; - Pressure = P_Total*pow((Temperature/T_Total), Gamma/Gamma_Minus_One); + /*--- Static temperature from the speed of sound relation ---*/ - /*--- Density at the inlet from the gas law ---*/ + Temperature = SoundSpeed2/(Gamma*Gas_Constant); - Density = Pressure/(Gas_Constant*Temperature); + /*--- Static pressure using isentropic relation at a point ---*/ - /*--- Using pressure, density, & velocity, compute the energy ---*/ + Pressure = P_Total*pow((Temperature/T_Total), Gamma/Gamma_Minus_One); - Energy = Pressure/(Density*Gamma_Minus_One) + 0.5*Velocity2; - if (tkeNeeded) Energy += GetTke_Inf(); + /*--- Density at the inlet from the gas law ---*/ - /*--- Primitive variables, using the derived quantities ---*/ + Density = Pressure/(Gas_Constant*Temperature); - V_inlet[0] = Temperature; - for (iDim = 0; iDim < nDim; iDim++) - V_inlet[iDim+1] = Velocity[iDim]; - V_inlet[nDim+1] = Pressure; - V_inlet[nDim+2] = Density; - V_inlet[nDim+3] = Energy + Pressure/Density; + /*--- Using pressure, density, & velocity, compute the energy ---*/ - break; - } - /*--- Mass flow has been specified at the inlet. ---*/ + Energy = Pressure/(Density*Gamma_Minus_One) + 0.5*Velocity2; + if (tkeNeeded) Energy += GetTke_Inf(); - case INLET_TYPE::MASS_FLOW: { + /*--- Primitive variables, using the derived quantities ---*/ - /*--- Retrieve the specified mass flow for the inlet. ---*/ + V_inlet[0] = Temperature; + for (iDim = 0; iDim < nDim; iDim++) + V_inlet[iDim+1] = Velocity[iDim]; + V_inlet[nDim+1] = Pressure; + V_inlet[nDim+2] = Density; + V_inlet[nDim+3] = Energy + Pressure/Density; - Density = Inlet_Ttotal[val_marker][iVertex]; - Vel_Mag = Inlet_Ptotal[val_marker][iVertex]; - const su2double* dir = Inlet_FlowDir[val_marker][iVertex]; - const su2double mag = GeometryToolbox::Norm(nDim, dir); - for (iDim = 0; iDim < nDim; iDim++) { - Flow_Dir[iDim] = dir[iDim] / mag; - } + break; + } + /*--- Mass flow has been specified at the inlet. ---*/ - /*--- Non-dim. the inputs if necessary. ---*/ + case INLET_TYPE::MASS_FLOW: { - Density /= config->GetDensity_Ref(); - Vel_Mag /= config->GetVelocity_Ref(); + /*--- Retrieve the specified mass flow for the inlet. ---*/ - /*--- Get primitives from current inlet state. ---*/ + Density = Inlet_Ttotal[val_marker][iVertex]; + Vel_Mag = Inlet_Ptotal[val_marker][iVertex]; + const su2double* dir = Inlet_FlowDir[val_marker][iVertex]; + const su2double mag = GeometryToolbox::Norm(nDim, dir); + for (iDim = 0; iDim < nDim; iDim++) { + Flow_Dir[iDim] = dir[iDim] / mag; + } - for (iDim = 0; iDim < nDim; iDim++) - Velocity[iDim] = nodes->GetVelocity(iPoint,iDim); - Pressure = nodes->GetPressure(iPoint); - SoundSpeed2 = Gamma*Pressure/V_domain[nDim+2]; + /*--- Non-dim. the inputs if necessary. ---*/ - /*--- Compute the acoustic Riemann invariant that is extrapolated - from the domain interior. ---*/ + Density /= config->GetDensity_Ref(); + Vel_Mag /= config->GetVelocity_Ref(); - Riemann = Two_Gamma_M1*sqrt(SoundSpeed2); - for (iDim = 0; iDim < nDim; iDim++) - Riemann += Velocity[iDim]*UnitNormal[iDim]; + /*--- Get primitives from current inlet state. ---*/ - /*--- Speed of sound squared for fictitious inlet state ---*/ + for (iDim = 0; iDim < nDim; iDim++) + Velocity[iDim] = nodes->GetVelocity(iPoint,iDim); + Pressure = nodes->GetPressure(iPoint); + SoundSpeed2 = Gamma*Pressure/V_domain[nDim+2]; - SoundSpeed2 = Riemann; - for (iDim = 0; iDim < nDim; iDim++) - SoundSpeed2 -= Vel_Mag*Flow_Dir[iDim]*UnitNormal[iDim]; + /*--- Compute the acoustic Riemann invariant that is extrapolated + from the domain interior. ---*/ - SoundSpeed2 = max(0.0,0.5*Gamma_Minus_One*SoundSpeed2); - SoundSpeed2 = SoundSpeed2*SoundSpeed2; + Riemann = Two_Gamma_M1*sqrt(SoundSpeed2); + for (iDim = 0; iDim < nDim; iDim++) + Riemann += Velocity[iDim]*UnitNormal[iDim]; - /*--- Pressure for the fictitious inlet state ---*/ + /*--- Speed of sound squared for fictitious inlet state ---*/ - Pressure = SoundSpeed2*Density/Gamma; + SoundSpeed2 = Riemann; + for (iDim = 0; iDim < nDim; iDim++) + SoundSpeed2 -= Vel_Mag*Flow_Dir[iDim]*UnitNormal[iDim]; - /*--- Energy for the fictitious inlet state ---*/ + SoundSpeed2 = max(0.0,0.5*Gamma_Minus_One*SoundSpeed2); + SoundSpeed2 = SoundSpeed2*SoundSpeed2; - Energy = Pressure/(Density*Gamma_Minus_One) + 0.5*Vel_Mag*Vel_Mag; - if (tkeNeeded) Energy += GetTke_Inf(); + /*--- Pressure for the fictitious inlet state ---*/ - /*--- Primitive variables, using the derived quantities ---*/ + Pressure = SoundSpeed2*Density/Gamma; - V_inlet[0] = Pressure / ( Gas_Constant * Density); - for (iDim = 0; iDim < nDim; iDim++) - V_inlet[iDim+1] = Vel_Mag*Flow_Dir[iDim]; - V_inlet[nDim+1] = Pressure; - V_inlet[nDim+2] = Density; - V_inlet[nDim+3] = Energy + Pressure/Density; + /*--- Energy for the fictitious inlet state ---*/ - break; - } - default: - SU2_MPI::Error("Unsupported INLET_TYPE.", CURRENT_FUNCTION); - break; - } + Energy = Pressure/(Density*Gamma_Minus_One) + 0.5*Vel_Mag*Vel_Mag; + if (tkeNeeded) Energy += GetTke_Inf(); - /*--- Set various quantities in the solver class ---*/ + /*--- Primitive variables, using the derived quantities ---*/ + Temperature = Pressure / ( Gas_Constant * Density); + V_inlet[0] = Temperature; + for (iDim = 0; iDim < nDim; iDim++) + V_inlet[iDim+1] = Vel_Mag*Flow_Dir[iDim]; + V_inlet[nDim+1] = Pressure; + V_inlet[nDim+2] = Density; + V_inlet[nDim+3] = Energy + Pressure/Density; - conv_numerics->SetPrimitive(V_domain, V_inlet); + break; + } + default: + SU2_MPI::Error("Unsupported INLET_TYPE.", CURRENT_FUNCTION); + break; + } - if (dynamic_grid) - conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); + /*--- Set various quantities in the solver class ---*/ - /*--- Compute the residual using an upwind scheme ---*/ + conv_numerics->SetPrimitive(V_domain, V_inlet); - auto residual = conv_numerics->ComputeResidual(config); + if (dynamic_grid) + conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); - /*--- Update residual value ---*/ + /*--- Compute the residual using an upwind scheme ---*/ - LinSysRes.AddBlock(iPoint, residual); + auto residual = conv_numerics->ComputeResidual(config); - /*--- Jacobian contribution for implicit integration ---*/ + /*--- Update residual value ---*/ - if (implicit) - Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); + LinSysRes.AddBlock(iPoint, residual); -// /*--- Viscous contribution, commented out because serious convergence problems ---*/ -// -// if (viscous) { -// -// /*--- Set laminar and eddy viscosity at the infinity ---*/ -// -// V_inlet[nDim+5] = nodes->GetLaminarViscosity(iPoint); -// V_inlet[nDim+6] = nodes->GetEddyViscosity(iPoint); -// -// /*--- Set the normal vector and the coordinates ---*/ -// -// visc_numerics->SetNormal(Normal); -// su2double Coord_Reflected[MAXNDIM]; -// GeometryToolbox::PointPointReflect(nDim, geometry->nodes->GetCoord(Point_Normal), -// geometry->nodes->GetCoord(iPoint), Coord_Reflected); -// visc_numerics->SetCoord(geometry->nodes->GetCoord(iPoint), Coord_Reflected); -// -// /*--- Primitive variables, and gradient ---*/ -// -// visc_numerics->SetPrimitive(V_domain, V_inlet); -// visc_numerics->SetPrimVarGradient(nodes->GetGradient_Primitive(iPoint), nodes->GetGradient_Primitive(iPoint)); -// -// /*--- Turbulent kinetic energy ---*/ -// -// if (config->GetKind_Turb_Model() == TURB_MODEL::SST) -// visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0), -// solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint,0)); -// -// /*--- Compute and update residual ---*/ -// -// auto residual = visc_numerics->ComputeResidual(config); -// LinSysRes.SubtractBlock(iPoint, residual); -// -// /*--- Jacobian contribution for implicit integration ---*/ -// -// if (implicit) -// Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); -// -// } + /*--- Jacobian contribution for implicit integration ---*/ - } + if (implicit) + Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); } END_SU2_OMP_FOR diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 06075fae558..fe2634fb2a5 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -136,8 +136,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.053563, -6.378250, -0.000000, 2.085790] - poiseuille_profile.test_vals_aarch64 = [-12.053563, -6.378250, -0.000000, 2.085790] + poiseuille_profile.test_vals = [-12.008990, -7.262477, -0.000000, 2.089953] + poiseuille_profile.test_vals_aarch64 = [-12.494717, -7.711274, -0.000000, 2.085796] test_list.append(poiseuille_profile) # 2D Rotational Periodic diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 66aa66fb805..5462560119e 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -311,7 +311,7 @@ def main(): flatplate_udobj.cfg_dir = "user_defined_functions" flatplate_udobj.cfg_file = "lam_flatplate.cfg" flatplate_udobj.test_iter = 20 - flatplate_udobj.test_vals = [-6.661084, -1.186974, -0.956148, 0.000640, -0.000642, 0.000539, -0.001181, 596.990000, 300.070000, 296.920000, 22.250000, 0.522670, 37.278000, 2.342900] + flatplate_udobj.test_vals = [-6.660355, -1.186227, -0.956763, 0.000642, -0.000643, 0.000540, -0.001184, 596.990000, 300.060000, 296.920000, 22.235000, 0.524150, 37.285000, 2.350100] test_list.append(flatplate_udobj) # Laminar cylinder (steady) @@ -344,8 +344,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.027089, -6.349320, -0.000000, 2.085790] - poiseuille_profile.test_vals_aarch64 = [-12.027089, -6.349320, -0.000000, 2.085790] + poiseuille_profile.test_vals = [-12.007512, -7.227061, -0.000000, 2.089953] + poiseuille_profile.test_vals_aarch64 = [-12.492864, -7.671632, -0.000000, 2.085796] test_list.append(poiseuille_profile) ########################## @@ -1019,7 +1019,7 @@ def main(): flatplate_unsteady.cfg_dir = "navierstokes/flatplate" flatplate_unsteady.cfg_file = "lam_flatplate_unst.cfg" flatplate_unsteady.test_iter = 3 - flatplate_unsteady.test_vals = [0.000008, -8.874953, -8.250030, -6.306009, -5.468992, -3.398179, 0.002075, -0.326075] + flatplate_unsteady.test_vals = [-8.875126, -8.250188, -6.305789, -5.469452, -3.398228, 0.002075, -0.326018] flatplate_unsteady.unsteady = True test_list.append(flatplate_unsteady) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 9ad6fa21f8e..7d0f0d10049 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -524,7 +524,7 @@ def main(): pywrapper_wavy_wall_steady.cfg_dir = "py_wrapper/wavy_wall" pywrapper_wavy_wall_steady.cfg_file = "run_steady.py" pywrapper_wavy_wall_steady.test_iter = 100 - pywrapper_wavy_wall_steady.test_vals = [-1.353293, 2.579229, -2.898115] + pywrapper_wavy_wall_steady.test_vals = [-1.352680, 2.579322, -2.898321] pywrapper_wavy_wall_steady.command = TestCase.Command("mpirun -n 2", "python", "run_steady.py") pywrapper_wavy_wall_steady.timeout = 1600 pywrapper_wavy_wall_steady.tol = 0.00001 diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index fae9d1ba727..10312c92cc3 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -198,8 +198,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.053706, -6.378351, -0.000000, 2.085790] - poiseuille_profile.test_vals_aarch64 = [-12.053706, -6.378351, -0.000000, 2.085790] + poiseuille_profile.test_vals = [-12.009021, -7.262796, -0.000000, 2.089953] + poiseuille_profile.test_vals_aarch64 = [-12.494684, -7.711379, -0.000000, 2.085796] #last 4 columns test_list.append(poiseuille_profile) ########################## @@ -1605,7 +1605,7 @@ def main(): pywrapper_custom_inlet.cfg_dir = "py_wrapper/custom_inlet" pywrapper_custom_inlet.cfg_file = "lam_flatplate.cfg" pywrapper_custom_inlet.test_iter = 20 - pywrapper_custom_inlet.test_vals = [-4.120585, -1.540325, -3.560392, 1.342419, -0.748768, 0.161248, -0.013208, 0.515780, -0.528990] + pywrapper_custom_inlet.test_vals = [-4.120910, -1.540677, -3.567156, 1.342054, -0.748463, 0.161782, -0.012949, 0.516060, -0.529000] pywrapper_custom_inlet.command = TestCase.Command(exec = "python", param = "run.py") pywrapper_custom_inlet.timeout = 1600 pywrapper_custom_inlet.tol = 0.0001