Repository navigation
Conversation
… with the su2 compiler option
# Conflicts: # SU2_CFD/include/numerics/scalar/scalar_convection.hpp # SU2_CFD/include/numerics/scalar/scalar_diffusion.hpp # SU2_CFD/include/solvers/CSpeciesFlameletSolver.hpp # SU2_CFD/include/variables/CSpeciesVariable.hpp # UnitTests/meson.build
…nto feature_CANTERA_PR
Rename the options to CANTERA_*, collect them in CanteraOptions, cap the transported species at 20 with a clear error, move the species diffusivities into the flow variables, use single-sided chemical source terms, and tidy the build scripts, tests and config template. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Move the ignition spark into CSolver and use it in all three solvers, split it out of CIncNSSolver::Preprocessing, make the Cantera solution and molar masses const, rename GetStateFailed to GetTemperatureIterationFailed, use size_t for the species count, check duplicate species names in CConfig, start the temperature iteration from an enthalpy estimate, and name the limits in the static_assert messages. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
FLUID_CANTERA is now available for SOLVER= NAVIER_STOKES and RANS, reusing the general equation of state numerics (general Roe/HLLC, CGeneralAvgGrad_Flow). - CFluidCantera: rho-e (Newton on temperature, shared with the h iteration), P-T, P-rho and rho-T states, frozen-composition derivatives and sound speed. New virtual CFluidModel::SetComposition sets the mixture for state calls without scalar arguments. Turbulent conductivity is added only in the incompressible solver, the compressible numerics add it themselves. - Enthalpy diffusion (storage, per-point terms and edge flux) and the stored mass diffusivities move from CIncNSSolver/CIncNSVariable to CFVMFlowSolverBase/CFlowVariable, used by both regimes. The species enthalpy flux is added to CGeneralAvgGrad_Flow. - CNSSolver passes the species composition to the fluid model, MUSCL reconstruction uses the node compositions, the chemistry is evaluated at the local density and temperature. - Supersonic inlet/outlet use the equation of state and pass the secondary variables for non-ideal fluids. - CConfig: compressible Cantera requires REF_DIMENSIONALIZATION= DIMENSIONAL, ROE or HLLC, and rejects the boundary conditions that assume an ideal gas. Fixes found on the way: - CNumerics::HeatFluxDiffusion and its Jacobian were not initialized, so the boundary viscous numerics could add an undefined energy flux. - CFluidModel::Getdmudrho_T/GetdmudT_rho dereferenced a null viscosity model for fluid models that compute viscosity themselves. - For non-ideal fluids, the supersonic inlet used ideal-gas relations, the general Roe flux at supersonic inlet/outlet read stale secondary variables, and the non-physical reconstruction check used the ideal-gas gamma. New test case combustion/supersonic_h2_channel: autoignition of lean (phi=0.2) premixed H2/air at 1200 K, 1 atm, Mach 2.5. Converged solution agrees with a 1D steady reacting-flow reference (reference_1d.py) within 20 K and 1.4% in pressure downstream of ignition; ignition is 8 mm early on the 1 mm grid and the gap halves with the grid spacing. The mesh is in the Testcases repository. Unit test Fluid_Cantera_Compressible checks the state round trips and the derivatives against finite differences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| names = ["H2", "H", "O", "O2", "OH", "H2O", "HO2", "H2O2", "AR"] | ||
| gas = ct.Solution(sys.argv[2] if len(sys.argv) > 2 else "h2o2.yaml") | ||
| rows = list(csv.DictReader(open(sys.argv[1]))) |
…sfer tests - CFluidCantera: SetTDState_hs (temperature from h, pressure from the ideal gas entropy relation) and SetTDState_Ps (Cantera setState_SP). BC_Riemann sets the composition of the boundary node, Riemann markers are allowed. - LowMachPrimitiveCorrection takes the edge compositions, LOW_MACH_CORR is allowed with the compressible Cantera model. - Isothermal and heat-transfer walls use the temperature derivatives of the secondary variables for non-ideal fluids. - Fix: the flow under-relaxation divided the static energy change by the static energy, which is negative with the formation energies of Cantera and froze the solution. Non-ideal fluids scale it by rho*cv*T = P*rho/(dP/de). - Fix: FLUID_CANTERA defaults to INIT_OPTION_INC= OPERATING_PRESSURE like the other mixture models; the incompressible slit burner cases ran at 115 and 137 kPa instead of THERMODYNAMIC_PRESSURE. New test cases in combustion/channel_heat_transfer (laminar planar channel, O2/N2, Riemann inlet/outlet): - isothermal wall, Nu = 7.40-7.61 against 7.541 (Shah & London); - uniform heat flux, Nu = 8.26-8.31 against 8.235; - Mach 0.01 with LOW_MACH_CORR, mass flow 0.65% from the incompressible solver; - conjugate heat transfer with a solid wall, fluid enthalpy drop, wall heat flux and heat through the solid agree within 0.3%. supersonic_h2_channel_mg.cfg runs the supersonic case with two multigrid levels, equal to the single grid solution within 5e-5 K. Five regression entries added. The meshes are in the Testcases repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| print(f"mass flow per width inlet {m_in:.6e} outlet {m_out:.6e} kg/(m s)") | ||
| print(f"enthalpy flux drop of the fluid {H_in - H_out:.4f} W/m") | ||
|
|
||
| rows = list(csv.DictReader(open(a.history))) |
|
|
||
|
|
||
| def read_tecplot(filename): | ||
| lines = open(filename).read().split("\n") |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.