g3d 2.6.0__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.
- g3d-2.6.0/PKG-INFO +11 -0
- g3d-2.6.0/calc/__init__.py +44 -0
- g3d-2.6.0/calc/calculator_env.py +147 -0
- g3d-2.6.0/calc/cflow.py +21 -0
- g3d-2.6.0/defs/__init__.py +117 -0
- g3d-2.6.0/defs/cflowvar.py +402 -0
- g3d-2.6.0/defs/common.py +225 -0
- g3d-2.6.0/defs/enums.py +237 -0
- g3d-2.6.0/defs/g3dcode.py +149 -0
- g3d-2.6.0/defs/g3dentity.py +126 -0
- g3d-2.6.0/defs/g3dramp.py +135 -0
- g3d-2.6.0/flow/__init__.py +22 -0
- g3d-2.6.0/g3d.egg-info/PKG-INFO +11 -0
- g3d-2.6.0/g3d.egg-info/SOURCES.txt +19 -0
- g3d-2.6.0/g3d.egg-info/dependency_links.txt +1 -0
- g3d-2.6.0/g3d.egg-info/top_level.txt +5 -0
- g3d-2.6.0/gas/__init__.py +4 -0
- g3d-2.6.0/gas/gas.py +308 -0
- g3d-2.6.0/mesh/__init__.py +14 -0
- g3d-2.6.0/setup.cfg +4 -0
- g3d-2.6.0/setup.py +8 -0
g3d-2.6.0/PKG-INFO
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""g3d/calc sub library"""
|
|
2
|
+
from .calculators import G3DGenericCalculator
|
|
3
|
+
from .calculators import G3DStagnationCalculator
|
|
4
|
+
from .calculators import G3DCalculator
|
|
5
|
+
from .calculators import G3DAcousticsCalculator
|
|
6
|
+
from .calculators import G3DExpansionWaveCalculator
|
|
7
|
+
from .calculators import G3DFrictionCalculator
|
|
8
|
+
from .calculators import G3DHeatCalculator
|
|
9
|
+
from .calculators import G3DMovingExpansionCalculator
|
|
10
|
+
from .calculators import G3DMovingShockCalculator
|
|
11
|
+
from .calculators import G3DNormalShockCalculator
|
|
12
|
+
from .calculators import G3DNozzleCalculator
|
|
13
|
+
from .calculators import G3DObliqueShockCalculator
|
|
14
|
+
from .calculators import G3DShockTubeCalculator
|
|
15
|
+
from .calculators import G3DChannelFlowCalculator
|
|
16
|
+
from .calculators import G3DNewtonRaphsonSolver
|
|
17
|
+
from .calculators import Q1DODESolver
|
|
18
|
+
|
|
19
|
+
from .calculator_env import CalculatorEnv
|
|
20
|
+
|
|
21
|
+
from .cflow import CFlow
|
|
22
|
+
from .cflow import EmbeddedCFlow
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
'G3DGenericCalculator',
|
|
26
|
+
'G3DStagnationCalculator',
|
|
27
|
+
'G3DCalculator',
|
|
28
|
+
'G3DAcousticsCalculator',
|
|
29
|
+
'G3DExpansionWaveCalculator',
|
|
30
|
+
'G3DFrictionCalculator',
|
|
31
|
+
'G3DHeatCalculator',
|
|
32
|
+
'G3DMovingExpansionCalculator',
|
|
33
|
+
'G3DMovingShockCalculator',
|
|
34
|
+
'G3DNormalShockCalculator',
|
|
35
|
+
'G3DNozzleCalculator',
|
|
36
|
+
'G3DObliqueShockCalculator',
|
|
37
|
+
'G3DShockTubeCalculator',
|
|
38
|
+
'G3DChannelFlowCalculator',
|
|
39
|
+
'G3DNewtonRaphsonSolver',
|
|
40
|
+
'Q1DODESolver',
|
|
41
|
+
'CalculatorEnv',
|
|
42
|
+
'CFlow',
|
|
43
|
+
'EmbeddedCFlow'
|
|
44
|
+
]
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""G3D calculator environment"""
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from g3d.gas import Gas
|
|
5
|
+
|
|
6
|
+
from .calculators import G3DGenericCalculator
|
|
7
|
+
from .calculators import G3DIdealGasCalculator
|
|
8
|
+
from .calculators import G3DStagnationCalculator
|
|
9
|
+
from .calculators import G3DAcousticsCalculator
|
|
10
|
+
from .calculators import G3DExpansionWaveCalculator
|
|
11
|
+
from .calculators import G3DFrictionCalculator
|
|
12
|
+
from .calculators import G3DHeatCalculator
|
|
13
|
+
from .calculators import G3DMovingExpansionCalculator
|
|
14
|
+
from .calculators import G3DMovingShockCalculator
|
|
15
|
+
from .calculators import G3DNormalShockCalculator
|
|
16
|
+
from .calculators import G3DNozzleCalculator
|
|
17
|
+
from .calculators import G3DObliqueShockCalculator
|
|
18
|
+
from .calculators import G3DShockTubeCalculator
|
|
19
|
+
from .calculators import G3DChannelFlowCalculator
|
|
20
|
+
from .calculators import Q1DODESolver
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class CalculatorEnv(G3DGenericCalculator):
|
|
24
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
25
|
+
"""initialize calculator environment"""
|
|
26
|
+
super().__init__(*args, **kwargs)
|
|
27
|
+
|
|
28
|
+
def _set_default(self) -> None:
|
|
29
|
+
super()._set_default()
|
|
30
|
+
|
|
31
|
+
self._gas = Gas()
|
|
32
|
+
self._ideal_gas = G3DIdealGasCalculator(update_code_type=False)
|
|
33
|
+
self._stagnation = G3DStagnationCalculator(update_code_type=False)
|
|
34
|
+
self._acoustics = G3DAcousticsCalculator(update_code_type=False)
|
|
35
|
+
self._expansion = G3DExpansionWaveCalculator(update_code_type=False)
|
|
36
|
+
self._friction = G3DFrictionCalculator(update_code_type=False)
|
|
37
|
+
self._heat = G3DHeatCalculator(update_code_type=False)
|
|
38
|
+
self._moving_expansion = G3DMovingExpansionCalculator(update_code_type=False)
|
|
39
|
+
self._moving_shock = G3DMovingShockCalculator(update_code_type=False)
|
|
40
|
+
self._normal_shock = G3DNormalShockCalculator(update_code_type=False)
|
|
41
|
+
self._nozzle = G3DNozzleCalculator(update_code_type=False)
|
|
42
|
+
self._oblique_shock = G3DObliqueShockCalculator(update_code_type=False)
|
|
43
|
+
self._shock_tube = G3DShockTubeCalculator(update_code_type=False)
|
|
44
|
+
self._channel_flow = G3DChannelFlowCalculator(update_code_type=False)
|
|
45
|
+
self._q1d_ode = Q1DODESolver(update_code_type=False)
|
|
46
|
+
|
|
47
|
+
self.__associate_gas()
|
|
48
|
+
|
|
49
|
+
def __associate_gas(self) -> None:
|
|
50
|
+
self._ideal_gas.gas = self._gas
|
|
51
|
+
self._stagnation.gas = self._gas
|
|
52
|
+
self._acoustics.gas = self._gas
|
|
53
|
+
self._expansion.gas = self._gas
|
|
54
|
+
self._friction.gas = self._gas
|
|
55
|
+
self._heat.gas = self._gas
|
|
56
|
+
self._moving_expansion.gas = self._gas
|
|
57
|
+
self._moving_shock.gas = self._gas
|
|
58
|
+
self._normal_shock.gas = self._gas
|
|
59
|
+
self._nozzle.gas = self._gas
|
|
60
|
+
self._oblique_shock.gas = self._gas
|
|
61
|
+
self._shock_tube.gas = self._gas
|
|
62
|
+
self._channel_flow.gas = self._gas
|
|
63
|
+
self._q1d_ode.gas = self._gas
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def gas(self) -> Gas:
|
|
67
|
+
"""gas relations"""
|
|
68
|
+
return self._gas
|
|
69
|
+
|
|
70
|
+
@gas.setter
|
|
71
|
+
def gas(self, g: Gas) -> None:
|
|
72
|
+
self._gas = g
|
|
73
|
+
self.__associate_gas()
|
|
74
|
+
|
|
75
|
+
def get_gas_data(self):
|
|
76
|
+
"""gets gas constants"""
|
|
77
|
+
return self._gas.get_gas_data()
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def ideal_gas(self) -> G3DIdealGasCalculator:
|
|
81
|
+
"""ideal gas calculator"""
|
|
82
|
+
return self._ideal_gas
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def stagnation(self) -> G3DStagnationCalculator:
|
|
86
|
+
"""reference flow state calculator (stagnation, sonic flow)"""
|
|
87
|
+
return self._stagnation
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def acoustics(self) -> G3DAcousticsCalculator:
|
|
91
|
+
"""acoustic properties calculator"""
|
|
92
|
+
return self._acoustics
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def expansion(self) -> G3DExpansionWaveCalculator:
|
|
96
|
+
"""Prandtl-Meyer expansion calculator"""
|
|
97
|
+
return self._expansion
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def friction(self) -> G3DFrictionCalculator:
|
|
101
|
+
"""one-dimensional flow with friction calculator"""
|
|
102
|
+
return self._friction
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def heat(self) -> G3DHeatCalculator:
|
|
106
|
+
"""one-dimensional flow with heat addition calculator"""
|
|
107
|
+
return self._heat
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def moving_expansion(self) -> G3DMovingExpansionCalculator:
|
|
111
|
+
"""moving expansion regions calculator"""
|
|
112
|
+
return self._moving_expansion
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def moving_shock(self) -> G3DMovingShockCalculator:
|
|
116
|
+
"""moving shock wave calculator"""
|
|
117
|
+
return self._moving_shock
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def normal_shock(self) -> G3DNormalShockCalculator:
|
|
121
|
+
"""normal shock wave calculator"""
|
|
122
|
+
return self._normal_shock
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def nozzle(self) -> G3DNozzleCalculator:
|
|
126
|
+
"""one-dimensional flow with area changes (nozzle, diffuser) calculator"""
|
|
127
|
+
return self._nozzle
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def oblique_shock(self) -> G3DObliqueShockCalculator:
|
|
131
|
+
"""oblique shock wave calculator"""
|
|
132
|
+
return self._oblique_shock
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def shock_tube(self) -> G3DShockTubeCalculator:
|
|
136
|
+
"""shock-tube relations calculator"""
|
|
137
|
+
return self._shock_tube
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def channel_flow(self) -> G3DChannelFlowCalculator:
|
|
141
|
+
"""compressible channel flow calculator"""
|
|
142
|
+
return self._channel_flow
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def q1d_ode(self) -> Q1DODESolver:
|
|
146
|
+
"""quasi-one dimensional ODE solver (area changes, friction & heat addition)"""
|
|
147
|
+
return self._q1d_ode
|
g3d-2.6.0/calc/cflow.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""CFlow calculator"""
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
from .calculator_env import CalculatorEnv
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CFlow(CalculatorEnv):
|
|
8
|
+
|
|
9
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
10
|
+
"""initialize CFlow placeholder"""
|
|
11
|
+
super().__init__(*args, **kwargs)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EmbeddedCFlow(CalculatorEnv):
|
|
15
|
+
|
|
16
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
17
|
+
"""initialize embedded CFlow placeholder"""
|
|
18
|
+
super().__init__(*args, **kwargs)
|
|
19
|
+
|
|
20
|
+
def _set_code_type(self) -> None:
|
|
21
|
+
pass
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""g3d/defs sub library"""
|
|
2
|
+
from .common import assure_path_exists
|
|
3
|
+
from .common import clean_path
|
|
4
|
+
from .common import G3DConvert
|
|
5
|
+
from .common import XMLDataItem
|
|
6
|
+
|
|
7
|
+
from .enums import CodeType
|
|
8
|
+
from .enums import EQNMode
|
|
9
|
+
from .enums import DIMMode
|
|
10
|
+
from .enums import BCTypes
|
|
11
|
+
from .enums import INTFTypes
|
|
12
|
+
from .enums import NUMTypes
|
|
13
|
+
from .enums import TIMESTEPTypes
|
|
14
|
+
from .enums import FaceType
|
|
15
|
+
from .enums import IOFLOWTypes
|
|
16
|
+
from .enums import WALLTypes
|
|
17
|
+
from .enums import FMPTypes
|
|
18
|
+
from .enums import GradientMode
|
|
19
|
+
from .enums import Q1DPipeType
|
|
20
|
+
from .enums import ShockDampingMode
|
|
21
|
+
from .enums import TimeStepperMode
|
|
22
|
+
from .enums import TVDLimiters
|
|
23
|
+
from .enums import TurbulenceModelMode
|
|
24
|
+
from .enums import FaceOrientation
|
|
25
|
+
from .enums import BlockFace
|
|
26
|
+
from .enums import AngleType
|
|
27
|
+
from .enums import Axis
|
|
28
|
+
from .enums import Direction
|
|
29
|
+
from .enums import Position
|
|
30
|
+
from .enums import NodeDistribution
|
|
31
|
+
from .enums import BinaryFormat
|
|
32
|
+
from .enums import FunctionByPass
|
|
33
|
+
from .enums import RampType
|
|
34
|
+
from .enums import CFlowVariableType
|
|
35
|
+
from .enums import CFlowRegime
|
|
36
|
+
from .enums import CFlowAdditionMode
|
|
37
|
+
from .enums import CFlowSolverMode
|
|
38
|
+
|
|
39
|
+
from .world.info import G3DInfo
|
|
40
|
+
from .world.options import G3DRunOptions
|
|
41
|
+
from .world.status import G3DSolverStatus
|
|
42
|
+
from .world.io import G3DIOSettings
|
|
43
|
+
from .world.display import G3DDisplay
|
|
44
|
+
from .world.sizes import G3DSizes
|
|
45
|
+
from .world.models import G3DModels
|
|
46
|
+
|
|
47
|
+
from .world.numerics.scheme import G3DScheme
|
|
48
|
+
from .world.numerics.time import G3DTime
|
|
49
|
+
from .world.numerics.irsm import G3DIRSM
|
|
50
|
+
from .world.numerics.limiters import G3DLimiters
|
|
51
|
+
from .world.numerics.num import G3DNum
|
|
52
|
+
|
|
53
|
+
from .world.world import G3DWorld
|
|
54
|
+
|
|
55
|
+
from .g3dentity import G3DEntity
|
|
56
|
+
from .g3dcode import G3DCode
|
|
57
|
+
from .g3dramp import G3DRamp
|
|
58
|
+
from .cflowvar import CFlowVar
|
|
59
|
+
from .cflowvar import CFlowVariables
|
|
60
|
+
from .cflowvar import CFlowStack
|
|
61
|
+
|
|
62
|
+
__all__ = [
|
|
63
|
+
'assure_path_exists',
|
|
64
|
+
'clean_path',
|
|
65
|
+
'G3DConvert',
|
|
66
|
+
'XMLDataItem',
|
|
67
|
+
'CodeType',
|
|
68
|
+
'EQNMode',
|
|
69
|
+
'DIMMode',
|
|
70
|
+
'BCTypes',
|
|
71
|
+
'INTFTypes',
|
|
72
|
+
'NUMTypes',
|
|
73
|
+
'TIMESTEPTypes',
|
|
74
|
+
'FaceType',
|
|
75
|
+
'IOFLOWTypes',
|
|
76
|
+
'WALLTypes',
|
|
77
|
+
'FMPTypes',
|
|
78
|
+
'GradientMode',
|
|
79
|
+
'Q1DPipeType',
|
|
80
|
+
'ShockDampingMode',
|
|
81
|
+
'TimeStepperMode',
|
|
82
|
+
'TVDLimiters',
|
|
83
|
+
'TurbulenceModelMode',
|
|
84
|
+
'FaceOrientation',
|
|
85
|
+
'BlockFace',
|
|
86
|
+
'AngleType',
|
|
87
|
+
'Axis',
|
|
88
|
+
'Direction',
|
|
89
|
+
'Position',
|
|
90
|
+
'NodeDistribution',
|
|
91
|
+
'BinaryFormat',
|
|
92
|
+
'FunctionByPass',
|
|
93
|
+
'RampType',
|
|
94
|
+
'G3DInfo',
|
|
95
|
+
'G3DRunOptions',
|
|
96
|
+
'G3DSolverStatus',
|
|
97
|
+
'G3DIOSettings',
|
|
98
|
+
'G3DDisplay',
|
|
99
|
+
'G3DSizes',
|
|
100
|
+
'G3DModels',
|
|
101
|
+
'G3DScheme',
|
|
102
|
+
'G3DTime',
|
|
103
|
+
'G3DIRSM',
|
|
104
|
+
'G3DLimiters',
|
|
105
|
+
'G3DNum',
|
|
106
|
+
'G3DWorld',
|
|
107
|
+
'G3DEntity',
|
|
108
|
+
'G3DCode',
|
|
109
|
+
'G3DRamp',
|
|
110
|
+
'CFlowVar',
|
|
111
|
+
'CFlowVariables',
|
|
112
|
+
'CFlowVariableType',
|
|
113
|
+
'CFlowStack',
|
|
114
|
+
'CFlowRegime',
|
|
115
|
+
'CFlowAdditionMode',
|
|
116
|
+
'CFlowSolverMode'
|
|
117
|
+
]
|