Skip to content

Commit

Permalink
Merge pull request #20 from sandialabs/docs
Browse files Browse the repository at this point in the history
Dev minor updates and bug fixes
  • Loading branch information
kevmoor authored Aug 9, 2024
2 parents b7c7c34 + 35d8c61 commit 6b8cc3a
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 96 deletions.
17 changes: 0 additions & 17 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ makedocs(;
modules = [OWENSFEA],
pages = [
"Home" => "index.md",
# "Getting Started" => joinpath("examples", "guide.md"),
# "Section Properties and Strain Recovery" => joinpath("examples", "section.md"),
# "Sensitivity Analysis" => joinpath("examples", "sensitivities.md"),
# "DifferentialEquations" => joinpath("examples", "diffeq.md"),
# "Examples" => [
# joinpath("examples", "cantilever.md"),
# joinpath("examples", "overdetermined.md"),
# joinpath("examples", "tipforce.md"),
# joinpath("examples", "tipmoment.md"),
# joinpath("examples", "curved.md"),
# joinpath("examples", "rotating.md"),
# joinpath("examples", "excited.md"),
# joinpath("examples", "wind-turbine-blade.md"),
# joinpath("examples", "static-joined-wing.md"),
# joinpath("examples", "dynamic-joined-wing.md"),
# joinpath("examples", "vertical-axis-wind-turbine.md"),
# ],
"API Reference" => joinpath("reference", "reference.md"),
],
sitename = "OWENSFEA.jl",
Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

OWENSFEA is a structural dynamics analysis tool intended to address the challenges associated with modeling Vertical Axis Wind Turbines (VAWTs), namely spin softening, centrifugal stiffening, and coriolis forces, in a numerically energy preserving finite element method. This finite element method is based on the Timoshenko beam element and can be run both for modal and unsteady analyses. Please see the following reference for more details.

Please make all feature changes and bug fixes as branches and then create pull requests against the dev branch. The dev branch will be periodically pulled into master for version changes.

Owens,B.C.,“Theoretical Developments and Practical Aspects of Dynamic Systems in Wind Energy Applications,”Ph.D. thesis, Texas A & M University, 2013. URL http://hdl.handle.net/1969.1/151813.
156 changes: 79 additions & 77 deletions src/rom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,83 +16,85 @@ This function executes a reduced order model analysis.
* `rom` object containing a reduced order feamodel
"""
function reducedOrderModel(elStorage,feamodel,mesh,el,displ)

countedNodes = []

rom0 = calculateROM(feamodel,mesh,el,displ,zeros(9),elStorage,countedNodes) #Omega = 0 #calculates system matrices for parked condition

#calculates system matrices for various acceleration, rotor speed, rotor accelration combinations
omx = 1
omy = 1
omz = 1

omxdot = 1
omydot = 1
omzdot = 1

a_x = 1
a_y = 1
a_z = 1

rom1 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x = 1 #OmegaDot_i = 0 accel _i = 0
rom2 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 omy 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_y = 1 #OmegaDot_i = 0 accel_i = 0
rom3 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_z = 1 #OmegaDot_i = 0 accel_i = 0
rom4 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx omy 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x,y = 1 #OmegaDot_i = 0 accel_i = 0
rom5 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 omy omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_y,z = 1 #OmegaDot_i = 0 accel_i = 0
rom6 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx 0.0 omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x,z = 1 #OmegaDot_i = 0 accel_i = 0
rom7 = calculateROMGyric(feamodel,mesh,el,displ,[a_x 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_x = 1
rom8 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 a_y 0.0 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_y = 1
rom9 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 a_z 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_z = 1
rom10 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 omxdot 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_1 = 0 accel_i=0
rom11 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 0.0 omydot 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_2 = 0 accel_i=0
rom12 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 omzdot],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_3 = 0 accel_i=0

#reduced order structural stiffness, mass, and damping
Kr = rom0.Kr
Mr = rom0.Mr
Cr = rom0.Cr + rom0.CrModal
Fr = rom0.Fr

#reduced order transformation matrices
Phi = rom0.Phi
invPhi = rom0.invPhi

#reduced order spin softening coefficient matrices
SrOx2 = rom1.Kr
SrOy2 = rom2.Kr
SrOz2 = rom3.Kr
SrOxOy = rom4.Kr - rom1.Kr - rom2.Kr
SrOyOz = rom5.Kr - rom2.Kr - rom3.Kr
SrOxOz = rom6.Kr - rom1.Kr - rom3.Kr

#reduced order centrifugal load coefficient matrices
FrOx2 = rom1.Fr
FrOy2 = rom2.Fr
FrOz2 = rom3.Fr
FrOxOy = rom4.Fr - rom1.Fr - rom2.Fr
FrOyOz = rom5.Fr - rom2.Fr - rom3.Fr
FrOxOz = rom6.Fr - rom1.Fr - rom3.Fr
FrOxdot = rom10.Fr
FrOydot = rom11.Fr
FrOzdot = rom12.Fr

#need to calculate reduced order acceleration/body force coefeficients
FrAx = rom7.Fr
FrAy = rom8.Fr
FrAz = rom9.Fr

#reduced order gyric coefficient matrices
GrOx = rom1.Cr
GrOy = rom2.Cr
GrOz = rom3.Cr

#reduced order circulatory coefficient matrices
HrOx = 0.5*rom1.Cr
HrOy = 0.5*rom2.Cr
HrOz = 0.5*rom3.Cr

rom = ROM(Kr,Mr,Cr,0.0,Fr,Phi,invPhi,SrOx2,SrOy2,SrOz2,SrOxOy,SrOyOz,SrOxOz,FrOx2,FrOy2,FrOz2,FrOxOy,FrOyOz,FrOxOz,FrOxdot,FrOydot,FrOzdot,FrAx,FrAy,FrAz,GrOx,GrOy,GrOz,HrOx,HrOy,HrOz)

if feamodel.analysisType == "ROM"
countedNodes = []

rom0 = calculateROM(feamodel,mesh,el,displ,zeros(9),elStorage,countedNodes) #Omega = 0 #calculates system matrices for parked condition

#calculates system matrices for various acceleration, rotor speed, rotor accelration combinations
omx = 1
omy = 1
omz = 1

omxdot = 1
omydot = 1
omzdot = 1

a_x = 1
a_y = 1
a_z = 1

rom1 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x = 1 #OmegaDot_i = 0 accel _i = 0
rom2 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 omy 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_y = 1 #OmegaDot_i = 0 accel_i = 0
rom3 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_z = 1 #OmegaDot_i = 0 accel_i = 0
rom4 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx omy 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x,y = 1 #OmegaDot_i = 0 accel_i = 0
rom5 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 omy omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_y,z = 1 #OmegaDot_i = 0 accel_i = 0
rom6 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 omx 0.0 omz 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_x,z = 1 #OmegaDot_i = 0 accel_i = 0
rom7 = calculateROMGyric(feamodel,mesh,el,displ,[a_x 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_x = 1
rom8 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 a_y 0.0 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_y = 1
rom9 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 a_z 0.0 0.0 0.0 0.0 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_i = 0 accel_z = 1
rom10 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 omxdot 0.0 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_1 = 0 accel_i=0
rom11 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 0.0 omydot 0.0],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_2 = 0 accel_i=0
rom12 = calculateROMGyric(feamodel,mesh,el,displ,[0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 omzdot],elStorage,rom0,countedNodes) #Omega_i = 0 #OmegaDot_3 = 0 accel_i=0

#reduced order structural stiffness, mass, and damping
Kr = rom0.Kr
Mr = rom0.Mr
Cr = rom0.Cr + rom0.CrModal
Fr = rom0.Fr

#reduced order transformation matrices
Phi = rom0.Phi
invPhi = rom0.invPhi

#reduced order spin softening coefficient matrices
SrOx2 = rom1.Kr
SrOy2 = rom2.Kr
SrOz2 = rom3.Kr
SrOxOy = rom4.Kr - rom1.Kr - rom2.Kr
SrOyOz = rom5.Kr - rom2.Kr - rom3.Kr
SrOxOz = rom6.Kr - rom1.Kr - rom3.Kr

#reduced order centrifugal load coefficient matrices
FrOx2 = rom1.Fr
FrOy2 = rom2.Fr
FrOz2 = rom3.Fr
FrOxOy = rom4.Fr - rom1.Fr - rom2.Fr
FrOyOz = rom5.Fr - rom2.Fr - rom3.Fr
FrOxOz = rom6.Fr - rom1.Fr - rom3.Fr
FrOxdot = rom10.Fr
FrOydot = rom11.Fr
FrOzdot = rom12.Fr

#need to calculate reduced order acceleration/body force coefeficients
FrAx = rom7.Fr
FrAy = rom8.Fr
FrAz = rom9.Fr

#reduced order gyric coefficient matrices
GrOx = rom1.Cr
GrOy = rom2.Cr
GrOz = rom3.Cr

#reduced order circulatory coefficient matrices
HrOx = 0.5*rom1.Cr
HrOy = 0.5*rom2.Cr
HrOz = 0.5*rom3.Cr

rom = ROM(Kr,Mr,Cr,0.0,Fr,Phi,invPhi,SrOx2,SrOy2,SrOz2,SrOxOy,SrOyOz,SrOxOz,FrOx2,FrOy2,FrOz2,FrOxOy,FrOyOz,FrOxOz,FrOxdot,FrOydot,FrOzdot,FrAx,FrAy,FrAz,GrOx,GrOy,GrOz,HrOx,HrOy,HrOz)
else
rom = ROM(nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing,nothing)
end
return rom
end

Expand Down
2 changes: 1 addition & 1 deletion src/structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ mutable struct Mesh
hubAngle
end

Mesh(nodeNum,numEl,numNodes,x,y,z,elNum,conn,type,meshSeg,structuralSpanLocNorm,structuralNodeNumbers,structuralElNumbers) = Mesh(nodeNum,numEl,numNodes,x,y,z,elNum,conn,type,meshSeg,structuralSpanLocNorm,structuralNodeNumbers,structuralElNumbers,nothing,1,zeros(3),zeros(3))
Mesh(nodeNum,numEl,numNodes,x,y,z,elNum,conn,type,meshSeg,structuralSpanLocNorm,structuralNodeNumbers,structuralElNumbers) = Mesh(nodeNum,numEl,numNodes,x,y,z,elNum,conn,type,meshSeg,structuralSpanLocNorm,structuralNodeNumbers,structuralElNumbers,0,1,zeros(3),zeros(3))

"""
Ort(Psi_d,Theta_d,Twist_d,Length,elNum,Offset)
Expand Down
2 changes: 1 addition & 1 deletion test/CantileverBeamModal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ platformTurbineConnectionNodeNumber = 1,
pBC = pBC,
numNodes = mesh.numNodes)

freq,damp,imagCompSign,U_x_0,U_y_0,U_z_0,theta_x_0,theta_y_0,theta_z_0,U_x_90,U_y_90,U_z_90,theta_x_90,theta_y_90,theta_z_90=OWENSFEA.modal(feamodel,mesh,el)
freq,damp,imagCompSign,U_x_0,U_y_0,U_z_0,theta_x_0,theta_y_0,theta_z_0,U_x_90,U_y_90,U_z_90,theta_x_90,theta_y_90,theta_z_90=OWENSFEA.modal(feamodel,mesh,el;returnDynMatrices=true)

# OWENS Frequencies that correspond to the GX beam are every other, and then 1,3,5 of the every other sets corresponds to the analytical

Expand Down

0 comments on commit 6b8cc3a

Please sign in to comment.