#rst Add local dvs # Comment out one or the other DVGeo.addGeoDVLocal('local', lower=-0.5, upper=0.5, axis='y', scale=1) DVGeo.addGeoDVSectionLocal('slocal', secIndex='k', axis=1, lower=-0.5, upper=0.5, scale=1) #rst Embed points gridFile = 'wing_vol.cgns' meshOptions = {'gridFile': gridFile} mesh = USMesh(options=meshOptions) coords = mesh.getSurfaceCoordinates() DVGeo.addPointSet(coords, 'coords') #rst Change dvs dvDict = DVGeo.getValues() dvDict['twist'] = numpy.linspace(0, 50, nRefAxPts)[1:] dvDict['dihedral'] = numpy.linspace(0, 3, nRefAxPts)[1:] dvDict['taper'] = numpy.array([1.2, 0.5]) dvDict['slocal'][::5] = 0.5 DVGeo.setDesignVars(dvDict) #rst Update DVGeo.update('coords') DVGeo.writePlot3d('ffd_deformed.xyz') DVGeo.writePointSet('coords', 'surf')
# rst Add local dvs # Comment out one or the other DVGeo.addGeoDVLocal("local", lower=-0.5, upper=0.5, axis="y", scale=1) DVGeo.addGeoDVSectionLocal("slocal", secIndex="k", axis=1, lower=-0.5, upper=0.5, scale=1) # rst Embed points gridFile = "wing_vol.cgns" meshOptions = {"gridFile": gridFile} mesh = USMesh(options=meshOptions) coords = mesh.getSurfaceCoordinates() DVGeo.addPointSet(coords, "coords") # rst Change dvs dvDict = DVGeo.getValues() dvDict["twist"] = np.linspace(0, 50, nRefAxPts)[1:] dvDict["dihedral"] = np.linspace(0, 3, nRefAxPts)[1:] dvDict["taper"] = np.array([1.2, 0.5]) dvDict["slocal"][::5] = 0.5 DVGeo.setDesignVars(dvDict) # rst Update DVGeo.update("coords") DVGeo.writePlot3d("ffd_deformed.xyz") DVGeo.writePointSet("coords", "surf")