cffview 0.2.3__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cffview
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A Python CLI tool to inspect Ansys Fluent .cas.h5/.msh.h5 files without opening Fluent
5
5
  Author-email: preamer <1524477126@qq.com>
6
6
  License-Expression: BSD-3-Clause
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cffview"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "A Python CLI tool to inspect Ansys Fluent .cas.h5/.msh.h5 files without opening Fluent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -90,6 +90,7 @@ def read_case(file_path: str, **kwargs) -> dict[
90
90
  data['solver']['radiation'] = key[3:-1]
91
91
  break
92
92
 
93
+ data['solver']['gravity'] = {}
93
94
  gravity = re.search(
94
95
  r'\(gravity\?\s+([^)\s]+)\)',
95
96
  general_info
@@ -105,7 +106,7 @@ def read_case(file_path: str, **kwargs) -> dict[
105
106
  fr'\(gravity/{axis}-expr\s+"([^"]+)"\)',
106
107
  general_info
107
108
  ).group(1)
108
- data['solver'][f'gravity/{axis}'] = f'{sel}/{expr}'
109
+ data['solver']['gravity'][axis] = f'{sel}/{expr}'
109
110
  else:
110
111
  data['solver']['gravity'] = "false"
111
112
 
@@ -120,6 +121,7 @@ def read_case(file_path: str, **kwargs) -> dict[
120
121
  ).group(1)
121
122
  if use_operating_density == '#t':
122
123
  operating_conditions.append('operating-density')
124
+ data['solver']['operating-conditions'] = {}
123
125
  for condition in operating_conditions:
124
126
  sel = re.search(
125
127
  fr'\({condition}-sel\s+"([^"]+)"\)',
@@ -129,7 +131,20 @@ def read_case(file_path: str, **kwargs) -> dict[
129
131
  fr'\({condition}-expr\s+"([^"]+)"\)',
130
132
  general_info
131
133
  ).group(1)
132
- data['solver'][condition] = f'{sel}/{expr}'
134
+ data['solver']['operating-conditions'][condition] = f'{sel}/{expr}'
135
+
136
+ reference_values = [
137
+ 'area', 'depth', 'density', 'enthalpy', 'length',
138
+ 'pressure', 'temperature', 'velocity', 'viscosity',
139
+ 'gamma', 'thread', 'tol', 'yplus'
140
+ ]
141
+ data['solver']['reference-values'] = {
142
+ value: re.search(
143
+ fr'\(reference-{value}\s+([^)\s]+)\)',
144
+ general_info
145
+ ).group(1)
146
+ for value in reference_values
147
+ }
133
148
 
134
149
  if kwargs['mat']:
135
150
  import sexpdata
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cffview
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: A Python CLI tool to inspect Ansys Fluent .cas.h5/.msh.h5 files without opening Fluent
5
5
  Author-email: preamer <1524477126@qq.com>
6
6
  License-Expression: BSD-3-Clause
File without changes
File without changes
File without changes
File without changes
File without changes