@@ -693,16 +693,13 @@ def copyTurbineFilesForEachCase(self, writeFiles=True):
693693 self .SElastoDynFile .write (os .path .join (currPath ,f'{ self .SEDfilename } { t + 1 } _mod.dat' ))
694694
695695 # Update each turbine's ServoDyn
696- self .ServoDynFile ['YawNeut' ] = yaw_deg_ + yaw_mis_deg_
697696 if self .hasController :
697+ self .ServoDynFile ['YawNeut' ] = yaw_deg_ + yaw_mis_deg_
698698 self .ServoDynFile ['VSContrl' ] = 5
699699 self .ServoDynFile ['DLL_FileName' ] = f'"{ self .DLLfilepath } { t + 1 } .so"'
700700 self .ServoDynFile ['DLL_InFile' ] = f'"{ self .controllerInputfilename } "'
701- else :
702- self .ServoDynFile ['DLL_FileName' ] = f'"unused"'
703- self .ServoDynFile ['DLL_InFile' ] = f'"unused"'
704- if writeFiles :
705- self .ServoDynFile .write ( os .path .join (currPath ,f'{ self .SrvDfilename } { t + 1 } _mod.dat' ))
701+ if writeFiles :
702+ self .ServoDynFile .write ( os .path .join (currPath ,f'{ self .SrvDfilename } { t + 1 } _mod.dat' ))
706703
707704 # Update each turbine's OpenFAST input
708705 self .turbineFile ['TMax' ] = self .tmax
@@ -747,7 +744,14 @@ def copyTurbineFilesForEachCase(self, writeFiles=True):
747744 self .turbineFile ['AeroFile' ] = f'"{ self .ADskfilepath } "'
748745 if writeFiles :
749746 if t == 0 : shutilcopy2_untilSuccessful (self .coeffTablefilepath , os .path .join (currPath ,self .coeffTablefilename ))
750- self .turbineFile ['ServoFile' ] = f'"{ self .SrvDfilename } { t + 1 } _mod.dat"'
747+
748+ if self .hasController :
749+ self .turbineFile ['ServoFile' ] = f'"{ self .SrvDfilename } { t + 1 } _mod.dat"'
750+ self .turbineFile ['CompServo' ] = 1
751+ else :
752+ self .turbineFile ['ServoFile' ] = f'"unused"'
753+ self .turbineFile ['CompServo' ] = 0
754+
751755 self .turbineFile ['HydroFile' ] = f'"{ self .HDfilename } "'
752756 self .turbineFile ['SubFile' ] = f'"{ self .SubDfilepath } "'
753757 self .turbineFile ['MooringFile' ] = f'"unused"'
@@ -815,8 +819,9 @@ def _were_all_turbine_files_copied(self):
815819 _ = checkIfExists (os .path .join (currPath ,f'{ self .SEDfilename } { t + 1 } _mod.dat' ))
816820 if not _ : return False
817821
818- _ = checkIfExists (os .path .join (currPath ,f'{ self .SrvDfilename } { t + 1 } _mod.dat' ))
819- if not _ : return False
822+ if self .hasController
823+ _ = checkIfExists (os .path .join (currPath ,f'{ self .SrvDfilename } { t + 1 } _mod.dat' ))
824+ if not _ : return False
820825
821826 if ADmodel_ == 'ADsk' :
822827 _ = checkIfExists (os .path .join (currPath ,self .coeffTablefilename ))
@@ -957,6 +962,7 @@ def checkIfExists(f):
957962 self .SrvDfilepath = os .path .join (self .templatePath , f"{ value } .dat" )
958963 checkIfExists (self .SrvDfilepath )
959964 self .SrvDfilename = value
965+ self .hasController = True
960966
961967 elif key == 'ADfilename' :
962968 if not value .endswith ('.dat' ):
0 commit comments