-
Notifications
You must be signed in to change notification settings - Fork 127
Unity Lewis Implementation #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c142fe3
d18106b
4e5a63f
3ac5690
7f5bac8
a001291
58910dc
1da8408
259f2a5
05fd51f
72233e0
cb259ec
476967a
15f1260
0e8124f
1c45ecf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -993,6 +993,22 @@ When ``cyl_coord = 'T'`` is set in 2D the following constraints must be met: | |||||
|
|
||||||
| - `bc_y%beg = -2` to enable reflective boundary conditions | ||||||
|
|
||||||
| ### 17. Chemistry | ||||||
|
|
||||||
| | Parameter | Type | Description | | ||||||
| | ---: | :---: | :--- | | ||||||
| | `chemistry` | Logical | Enable chemistry simulation | | ||||||
| | `chem_params%diffusion` | Logical | Enable multispecies diffusion | | ||||||
| | `chem_params%reactions` | Logical | Enable chemical reactions | | ||||||
| | `chem_params%gamma_method` | Integer | Methodology for calculating the heat capacity ratio | | ||||||
| | `chem_params%transport_model` | Integer | Methodology for calculating the diffusion coefficients | | ||||||
| | `cantera_file` | String | Cantera-format mechanism file (e.g., .yaml) | | ||||||
|
|
||||||
| - `chem_params%transport_model` specifies the methodology for calculating diffusion coefficients and other transport properties,`1` for mixture-average, `2` for Unity-Lewis | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix spacing after comma. There's a missing space between the comma and the backtick: "properties,`1`" should be "properties, `1`". 🔎 Proposed fix-- `chem_params%transport_model` specifies the methodology for calculating diffusion coefficients and other transport properties,`1` for mixture-average, `2` for Unity-Lewis
+- `chem_params%transport_model` specifies the methodology for calculating diffusion coefficients and other transport properties, `1` for mixture-average, `2` for Unity-Lewis📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| - `cantera_file` specifies the chemical mechanism file. If the file is part of the standard Cantera library, only the filename is required. Otherwise, the file must be located in the same directory as your `case.py` file | ||||||
|
|
||||||
|
|
||||||
| ## Enumerations | ||||||
|
|
||||||
| ### Boundary conditions | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| #!/usr/bin/env python3 | ||
| # References: | ||
| # + https://doi.org/10.1016/j.compfluid.2013.10.014: 4.4. Multicomponent diffusion test case | ||
|
|
||
| import json | ||
| import argparse | ||
| import math | ||
| import cantera as ct | ||
|
|
||
| ctfile = "gri30.yaml" | ||
| sol_L = ct.Solution(ctfile) | ||
| sol_L.TPX = 300, 8000, "O2:2,N2:2,H2O:5" | ||
|
|
||
| L = 0.05 | ||
| Nx = 100 | ||
| dx = L / Nx | ||
| dt = 0.3e-6 | ||
| Tend = 0.05 | ||
|
|
||
| NT = int(Tend / dt) | ||
| SAVE_COUNT = 2000 | ||
| NS = 2000 | ||
| case = { | ||
| "run_time_info": "T", | ||
| "x_domain%beg": 0, | ||
| "x_domain%end": +L, | ||
| "m": Nx, | ||
| "n": 0, | ||
| "p": 0, | ||
| "dt": float(dt), | ||
| "t_step_start": 0, | ||
| "t_step_stop": NT, | ||
| "t_step_save": NS, | ||
| "t_step_print": NS, | ||
| "parallel_io": "F", | ||
| "model_eqns": 2, | ||
| "num_fluids": 1, | ||
| "num_patches": 1, | ||
| "mpp_lim": "F", | ||
| "mixture_err": "F", | ||
| "time_stepper": 3, | ||
| "weno_order": 5, | ||
| "weno_eps": 1e-16, | ||
| "weno_avg": "F", | ||
| "mapped_weno": "T", | ||
| "mp_weno": "T", | ||
| "riemann_solver": 2, | ||
| "wave_speeds": 2, | ||
| "avg_state": 1, | ||
| "bc_x%beg": -1, | ||
| "bc_x%end": -1, | ||
| "viscous": "F", | ||
| "chemistry": "T", | ||
| "chem_params%diffusion": "T", | ||
| "chem_params%reactions": "F", | ||
| "chem_params%transport_model": 2, # Unity-Lewis | ||
| "format": 1, | ||
| "precision": 2, | ||
| "prim_vars_wrt": "T", | ||
| "chem_wrt_T": "T", | ||
| "patch_icpp(1)%geometry": 1, | ||
| "patch_icpp(1)%hcid": 182, | ||
| "patch_icpp(1)%x_centroid": L / 2, | ||
| "patch_icpp(1)%length_x": L, | ||
| "patch_icpp(1)%vel(1)": "0", | ||
| "patch_icpp(1)%pres": 1.01325e5, | ||
| "patch_icpp(1)%alpha(1)": 1, | ||
| "patch_icpp(1)%alpha_rho(1)": 1, | ||
| "fluid_pp(1)%gamma": 1.0e00 / (1.9326e00 - 1.0e00), | ||
| "fluid_pp(1)%pi_inf": 0, | ||
| "cantera_file": ctfile, | ||
| } | ||
|
|
||
| for i in range(len(sol_L.Y)): | ||
| case[f"chem_wrt_Y({i + 1})"] = "T" | ||
| case[f"patch_icpp(1)%Y({i+1})"] = 0.0 | ||
| if __name__ == "__main__": | ||
| print(json.dumps(case)) |
DimAdam-01 marked this conversation as resolved.
Show resolved
Hide resolved
|
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's supposed to be %% not %... look at the other tables... or just build the documentation and see