Skip to content

Commit

Permalink
Merge pull request #70 from sandialabs/spokemesh
Browse files Browse the repository at this point in the history
Custom Mesh Option
  • Loading branch information
kevmoor authored Jul 24, 2024
2 parents 43ce583 + 14c74cd commit 4622f12
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Turbulent inflow is provided by OWENSOpenFASTWrappers.jl and the inflowwind and
Rainflow counting was provided by Rainflow.jl, however, this package became orphained and was pulled into the OWENS code base.

## Installation
Please follow the instructions on the setup page
Please follow the instructions on the setup page in the documentation.

## Documentation
- https://sandialabs.github.io/OWENS.jl
Expand Down
8 changes: 1 addition & 7 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# Optimization Considerations

My text

[comment] ![](../assets/OWENS_Example_Figure_Building_Blocks.png)

my text
# nothing yet
34 changes: 31 additions & 3 deletions src/SetupTurbine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function setupOWENS(OWENSAero,path;
DSModel="BV",
RPI=true,
cables_connected_to_blade_base = true,
meshtype = "Darrieus") #Darrieus, H-VAWT, ARCUS
meshtype = "Darrieus",
custommesh = nothing) #Darrieus, H-VAWT, ARCUS

if AModel=="AD"
AD15On = true
Expand Down Expand Up @@ -77,7 +78,7 @@ function setupOWENS(OWENSAero,path;
#########################################
### Set up mesh
#########################################
if meshtype == "ARCUS" #TODO, for all of these propogate the AeroDyn additional output requirements
if meshtype == "ARCUS" && custommesh == nothing #TODO, for all of these propogate the AeroDyn additional output requirements
mymesh,myort,myjoint = OWENS.create_arcus_mesh(;Htwr_base,
Hbld = H, #blade height
R, # m bade radius
Expand All @@ -91,7 +92,7 @@ function setupOWENS(OWENSAero,path;
joint_type, #hinged about y axis
cables_connected_to_blade_base,
angularOffset) #Blade shape, magnitude is irrelevant, scaled based on height and radius above
elseif meshtype == "Darrieus" || meshtype == "H-VAWT"
elseif (meshtype == "Darrieus" || meshtype == "H-VAWT") && custommesh == nothing

if meshtype == "Darrieus"
connectBldTips2Twr = true
Expand All @@ -117,6 +118,25 @@ function setupOWENS(OWENSAero,path;
AD15_ccw = true,
verbosity=0, # 0 nothing, 1 basic, 2 lots: amount of printed information
connectBldTips2Twr)
elseif custommesh != nothing
mymesh, myort, myjoint, AD15bldNdIdxRng, AD15bldElIdxRng = custommesh(;Htwr_base,
Htwr_blds,
Hbld = H, #blade height
R, # m bade radius
AD15hubR, #TODO: hook up with AD15 file generation
nblade = Nbld,
ntelem, #tower elements
nbelem, #blade elements
nselem,
strut_twr_mountpoint,
strut_bld_mountpoint,
bshapex = shapeX, #Blade shape, magnitude is irrelevant, scaled based on height and radius above
bshapez = shapeZ,
bshapey = shapeY, # but magnitude for this is relevant
angularOffset, #Blade shape, magnitude is irrelevant, scaled based on height and radius above
AD15_ccw = true,
verbosity=0, # 0 nothing, 1 basic, 2 lots: amount of printed information)
)
else #TODO unify with HAWT
error("please choose a valid mesh type (Darrieus, H-VAWT, ARCUS)")
end
Expand Down Expand Up @@ -367,6 +387,14 @@ function setupOWENS(OWENSAero,path;
end
rotationalEffects = ones(mymesh.numEl) #TODO: non rotating tower, or rotating blades

if length(sectionPropsArray)<mymesh.numEl
@warn "There are more mesh elements than sectional properties, applying the last strut's sectional properties to the remaining"
n_diff = mymesh.numEl - length(sectionPropsArray)
sectionPropsArray = [sectionPropsArray; fill(sectionPropsArray_strut[end][2],n_diff)]
stiff_array = [stiff_array;fill(stiff_strut[end][2],n_diff)]
mass_array = [mass_array;fill(mass_strut[end][2],n_diff)]
end

#store data in element object
myel = OWENSFEA.El(sectionPropsArray,myort.Length,myort.Psi_d,myort.Theta_d,myort.Twist_d,rotationalEffects)
system, assembly, sections = OWENS.owens_to_gx(mymesh,myort,myjoint,sectionPropsArray,stiff_array,mass_array)
Expand Down
2 changes: 1 addition & 1 deletion src/Unsteady_Land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ function Unsteady_Land(inputs;topModel=nothing,topMesh=nothing,topEl=nothing,

# Strain stiffening, save at the end of the simulation, at the last while loop iteration, mutates elStorage
if (i==numTS-1 || timeconverged == true) && inputs.analysisType=="TNB" && topModel.nlParams.predef=="update" && (!(uNorm > TOL || platNorm > TOL || aziNorm > TOL || gbNorm > TOL) || (numIterations >= MAXITER))
OWENSFEA.structuralDynamicsTransient(topModel,topMesh,topEl,topdata.topDispData2,topdata.Omega_s,topdata.OmegaDot_s,t[i+1],topdata.delta_t,topdata.topElStorage,topdata.topFexternal,Int.(aeroDOFs),topdata.CN2H,topdata.rbData;predef = topModel.nlParams.predef)
OWENSFEA.structuralDynamicsTransient(topModel,topMesh,topEl,topdata.topDispData2,topdata.Omega_s,topdata.OmegaDot_s,t[i+1],topdata.delta_t,topElStorage,topdata.topFexternal,Int.(aeroDOFs),topdata.CN2H,topdata.rbData;predef = topModel.nlParams.predef)
end

if verbosity>4
Expand Down

0 comments on commit 4622f12

Please sign in to comment.