diff --git a/doc/source/API/SetupTemplatesIcepak.rst b/doc/source/API/SetupTemplatesIcepak.rst index 0d3c46980c8..97212557adc 100644 --- a/doc/source/API/SetupTemplatesIcepak.rst +++ b/doc/source/API/SetupTemplatesIcepak.rst @@ -14,7 +14,7 @@ You can edit a setup after it is created. Here is an example: # Any property of this setup can be found on this page. setup = app.create_setup(MaxIterations=5) - +Available turbulent models are: ``"ZeroEquation"``, ``"TwoEquation"``, ``"EnhancedTwoEquation"``, ``"RNG"``, ``"EnhancedRNG"``, ``"RealizableTwoEquation"``, ``"EnhancedRealizableTwoEquation"``, ``"SpalartAllmaras"``, ``"kOmegaSST"``. .. pprint:: pyaedt.modules.SetupTemplates.TransientFlowOnly .. pprint:: pyaedt.modules.SetupTemplates.TransientTemperatureOnly diff --git a/pyaedt/generic/general_methods.py b/pyaedt/generic/general_methods.py index a286641a2f7..432acb95a12 100644 --- a/pyaedt/generic/general_methods.py +++ b/pyaedt/generic/general_methods.py @@ -253,7 +253,7 @@ def deprecate_kwargs(func_name, kwargs, aliases): msg += "{} is deprecated, use {} instead.".format(alias, new) raise TypeError(msg) pyaedt_logger.warning( - '`{}` is deprecated as an argument to `{}`; use" f" `{}` instead.'.format(alias, func_name, new) + "Argument `{}` is deprecated for method `{}`; use `{}` instead.".format(alias, func_name, new) ) kwargs[new] = kwargs.pop(alias) diff --git a/pyaedt/generic/plot.py b/pyaedt/generic/plot.py index ce95fcd9c6a..76c8a18b5ad 100644 --- a/pyaedt/generic/plot.py +++ b/pyaedt/generic/plot.py @@ -1327,7 +1327,24 @@ def _read_mesh_files(self, read_frames=False): if ".case" in field.path: reader = pv.get_reader(os.path.abspath(field.path)).read() field._cached_polydata = reader[reader.keys()[0]].extract_surface() - field.scalar_name = field._cached_polydata.point_data.active_scalars_name + + if ( + hasattr(field._cached_polydata.point_data, "active_vectors") + and field._cached_polydata.point_data.active_vectors_name + ): + field.scalar_name = field._cached_polydata.point_data.active_scalars_name + vector_scale = (max(field._cached_polydata.bounds) - min(field._cached_polydata.bounds)) / ( + 10 + * ( + np.vstack(field._cached_polydata.active_vectors).max() + - np.vstack(field._cached_polydata.active_vectors).min() + ) + ) + field._cached_polydata["vectors"] = field._cached_polydata.active_vectors * vector_scale + + field.is_vector = True + else: + field.scalar_name = field._cached_polydata.point_data.active_scalars_name elif ".aedtplt" in field.path: vertices, faces, scalars, log1 = _parse_aedtplt(field.path) diff --git a/pyaedt/modules/SetupTemplates.py b/pyaedt/modules/SetupTemplates.py index 3125de54ca0..b55424bb77f 100644 --- a/pyaedt/modules/SetupTemplates.py +++ b/pyaedt/modules/SetupTemplates.py @@ -317,6 +317,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Temperature": True, "Include Flow": True, "Include Gravity": False, @@ -380,6 +381,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Temperature": True, "Include Gravity": False, "Solution Initialization - X Velocity": "0m_per_sec", @@ -441,6 +443,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Flow": True, "Include Gravity": False, "Solution Initialization - X Velocity": "0m_per_sec", @@ -793,6 +796,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Temperature": True, "Include Flow": True, "Include Gravity": False, @@ -811,7 +815,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Convergence Criteria - Turbulent Dissipation Rate": "0.001", "Convergence Criteria - Specific Dissipation Rate": "0.001", "Convergence Criteria - Discrete Ordinates": "1e-06", - "IsEnabled:=": False, + "IsEnabled": False, "Radiation Model": "Off", "Solar Radiation Model": "Solar Radiation Calculator", "Solar Radiation - Scattering Fraction": "0", @@ -865,9 +869,9 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Linear Solver Stabilization - Temperature": "None", "Coupled pressure-velocity formulation": False, "Frozen Flow Simulation": False, - "Start Time:=": "0s", - "Stop Time:=": "20s", - "Time Step:=": "1s", + "Start Time": "0s", + "Stop Time": "20s", + "Time Step": "1s", "Iterations per Time Step": 20, "Import Start Time": False, "Copy Fields From Source": False, @@ -883,6 +887,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Temperature": True, "Include Flow": False, "Include Gravity": False, @@ -901,7 +906,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Convergence Criteria - Turbulent Dissipation Rate": "0.001", "Convergence Criteria - Specific Dissipation Rate": "0.001", "Convergence Criteria - Discrete Ordinates": "1e-06", - "IsEnabled:=": False, + "IsEnabled": False, "Radiation Model": "Off", "Solar Radiation Model": "Solar Radiation Calculator", "Solar Radiation - Scattering Fraction": "0", @@ -955,9 +960,9 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Linear Solver Stabilization - Temperature": "None", "Coupled pressure-velocity formulation": False, "Frozen Flow Simulation": False, - "Start Time:=": "0s", - "Stop Time:=": "20s", - "Time Step:=": "1s", + "Start Time": "0s", + "Stop Time": "20s", + "Time Step": "1s", "Iterations per Time Step": 20, "Import Start Time": False, "Copy Fields From Source": False, @@ -973,6 +978,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): { "Enabled": True, "Flow Regime": "Laminar", + "Turbulent Model Eqn": "ZeroEquation", "Include Temperature": False, "Include Flow": True, "Include Gravity": False, @@ -991,7 +997,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Convergence Criteria - Turbulent Dissipation Rate": "0.001", "Convergence Criteria - Specific Dissipation Rate": "0.001", "Convergence Criteria - Discrete Ordinates": "1e-06", - "IsEnabled:=": False, + "IsEnabled": False, "Radiation Model": "Off", "Solar Radiation Model": "Solar Radiation Calculator", "Solar Radiation - Scattering Fraction": "0", @@ -1045,9 +1051,9 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Linear Solver Stabilization - Temperature": "None", "Coupled pressure-velocity formulation": False, "Frozen Flow Simulation": False, - "Start Time:=": "0s", - "Stop Time:=": "20s", - "Time Step:=": "1s", + "Start Time": "0s", + "Stop Time": "20s", + "Time Step": "1s", "Iterations per Time Step": 20, "Import Start Time": False, "Copy Fields From Source": False, @@ -1150,7 +1156,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "InclBBoxOption": 1, "AuxBlock": OrderedDict({}), "DoAdaptive": True, - "Color": ["R:=", 0, "G:=", 0, "B:=", 0], # TODO: create something smart for color arrays: like a class + "Color": ["R", 0, "G", 0, "B", 0], # TODO: create something smart for color arrays: like a class "AdvancedSettings": HFSS3DLayout_AdvancedSettings, "CurveApproximation": HFSS3DLayout_CurveApproximation, "Q3D_DCSettings": HFSS3DLayout_Q3D_DCSettings, @@ -1225,7 +1231,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "ICModeLength": "50nm", "AuxBlock": OrderedDict({}), "DoAdaptive": True, - "Color": ["R:=", 0, "G:=", 0, "B:=", 0], # TODO: create something smart for color arrays: like a class + "Color": ["R", 0, "G", 0, "B", 0], # TODO: create something smart for color arrays: like a class "AdvancedSettings": HFSS3DLayout_AdvancedSettings, "CurveApproximation": HFSS3DLayout_CurveApproximation, "Q3D_DCSettings": HFSS3DLayout_Q3D_DCSettings, @@ -1240,8 +1246,8 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): HFSS3DLayout_SIWAdvancedSettings = OrderedDict( { "IncludeCoPlaneCoupling": True, - "IncludeInterPlaneCoupling:=": False, - "IncludeSplitPlaneCoupling:=": True, + "IncludeInterPlaneCoupling": False, + "IncludeSplitPlaneCoupling": True, "IncludeFringeCoupling": True, "IncludeTraceCoupling": True, "XtalkThreshold": "-34", @@ -1334,7 +1340,7 @@ def HFSS3DLayout_AdaptiveFrequencyData(freq): "Properties": HFSS3DLayout_Properties, "CustomSetup": False, "SolveSetupType": "SIwave", - "Color": ["R:=", 0, "G:=", 0, "B:=", 0], + "Color": ["R", 0, "G", 0, "B", 0], "Position": 0, "SimSetupType": "kSIwave", "SimulationSettings": HFSS3DLayout_ACSimulationSettings, diff --git a/pyproject.toml b/pyproject.toml index e3fb408d113..0d57d7120e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "fpdf2", "jsonschema", "psutil", - "pyedb>=0.4.0,<0.5; python_version == '3.7'", + "pyedb>=0.4.0,<0.9; python_version == '3.7'", "pyedb>=0.5.0; python_version > '3.7'", "pytomlpp; python_version < '3.12'", "rpyc>=6.0.0,<6.1", @@ -49,7 +49,7 @@ tests = [ "pytest>=7.4.0,<8.2", "pytest-cov>=4.0.0,<5.1", "pytest-xdist>=3.5.0,<3.7", - "pyedb>=0.4.0,<0.5; python_version == '3.7'", + "pyedb>=0.4.0,<0.9; python_version == '3.7'", "pyedb>=0.5.0,<0.9; python_version > '3.7'", "pyvista>=0.38.0,<0.44", "scikit-learn>=1.0.0,<1.5",