From 1fe26c9c461e4dab938c99918b7c62c0567ac2c1 Mon Sep 17 00:00:00 2001 From: ptrbortolotti Date: Thu, 13 Nov 2025 17:22:01 -0700 Subject: [PATCH 1/2] fix dt vs ds and allow dylibs --- openfast_toolbox/fastfarm/FASTFarmCaseCreation.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py b/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py index 09f0517..5818386 100644 --- a/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py +++ b/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py @@ -545,7 +545,7 @@ def _determine_resolutions_from_dummy_amrwind_grid(self): from openfast_toolbox.fastfarm.AMRWindSimulation import AMRWindSimulation # Create values and keep variable names consistent across interfaces - dummy_dt = 0.1 + dummy_dt = 0.01 dummy_ds = 1 prob_lo = (-10005, -10005, 0) # The 5 m offset is such that we prob_hi = ( 10005, 10005, 1000) # have a cell center at (0,0) @@ -576,9 +576,9 @@ def _determine_resolutions_from_dummy_amrwind_grid(self): print(f' If the values above are okay, you can safely ignore this warning.\n') self.dt_high = amr.dt_high_les - self.ds_high = amr.dt_high_les + self.ds_high = amr.ds_high_les self.dt_low = amr.dt_low_les - self.ds_low = amr.dt_low_les + self.ds_low = amr.ds_low_les @@ -1289,8 +1289,8 @@ def checkIfExists(f): self.turbfilename = value elif key == 'libdisconfilepath': - if not value.endswith('.so'): - raise ValueError(f'The libdiscon file should end in "*.so"') + if not value.endswith('.so') and not value.endswith('.dylib'): + raise ValueError(f'The libdiscon file should end in "*.so" or "*.dylib"') if os.path.isabs(value): self.libdisconfilepath = value else: From e6b0f5ccc3892f6f0e4f3dedf9cb24c8d25c414d Mon Sep 17 00:00:00 2001 From: ptrbortolotti Date: Fri, 14 Nov 2025 13:20:26 -0700 Subject: [PATCH 2/2] if dX_Low ==0, set it equal to dX_High --- openfast_toolbox/fastfarm/FASTFarmCaseCreation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py b/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py index 5818386..db5f460 100644 --- a/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py +++ b/openfast_toolbox/fastfarm/FASTFarmCaseCreation.py @@ -2457,6 +2457,8 @@ def _getBoxesParamsForFF(self, lowbts, highbts, dt_low_desired, D, HubHt, xWT, y # ----- Low dT_Low = getMultipleOf(dt_low_desired, multipleof=dT_High) dX_Low = getMultipleOf(meanU_Low*dT_Low, multipleof=dX_High) + if dX_Low == 0.: + dX_Low = dX_High dY_Low = lowbts.y[1] - lowbts.y[0] dZ_Low = lowbts.z[1] - lowbts.z[0]