Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N struts #68

Merged
merged 9 commits into from
Jul 12, 2024
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ new*
*vtk*
*.sum
*.ech
*2.dat
*.dat
*.docx
*COMPILED*
*.out
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OWENS"
uuid = "51d15398-4eaf-40f9-a029-79ae1c4a3867"
authors = ["Kevin R. Moore <[email protected]> and contributors"]
version = "1.0.2"
version = "1.0.3"

[deps]
Composites = "d0d699f6-c662-11e8-0fb1-1b30104ab829"
Expand Down
65 changes: 56 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,62 @@
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://sandialabs.github.io/OWENS.jl)
![](https://github.com/sandialabs/OWENS.jl/workflows/CI/badge.svg)

This repository is based on the original structural dynamics solver by Brian Owens (see dissertation: http://hdl.handle.net/1969.1/151813).
The original code has been translated to Julia and revised for simplicity and performance while maintaining accuracy. GXBeam.jl has also been coupled for geometrically exact beam solutions
The aerodynamics are provided by the OWENSAero.jl module (https://gitlab.sandia.gov/8821-vawt-tools/OWENSAero.jl) in addition to a coupling to the OpenFAST AeroDyn module. All codes that can be standalone (like the aerodynamics and structures) should be separate and handled through the dependency manager, other functions specific to the OWENS ontology should remain in this repository.

## Examples
Please see the documentation under examples.
This package was based on the original structural dynamics solver by Brian Owens (see dissertation: http://hdl.handle.net/1969.1/151813). However, it has been rewritten into the Julia programming language and many of the issues related to aerodynamic coupling and floating dynamics solved, with extensive expansion into other areas and features to provide a seamless and automated process that takes in high level design details and does all of the preprocessing, running, and post processing that is normally done under different roofs or by different manual processes. This was done with the intent of enabling fast, parametric design. We have many of the modules propogating automatic gradients, however this is still a future challenge to solve well.

## Installation
Please see the documentation under setup.
This package is for experienced researchers with both software and engineering experience who need generalized flexibility and performance that is 100% open source. If you want a windows compatible GUI, please use QBlade from our friends across the pond.

## Contributing
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 significant version changes.
Here are several examples of OWENS use cases, current and past, including the Sandia 34m research turbine.

<img src="docs/src/assets/SNL34m.png" alt="drawing" width="400"/>

Then here is an example of a helical design. Note that arbitrary numbers of struts can be specified in the automatic meshing functions. You can also write your own generalized mesh using the internal building blocks, but it is not thouroughly documented.

<img src="docs/src/assets/helical.png" alt="drawing" width="400"/>

The generalized meshing was modified to include HAWT concepts, like this bi-wing concept. OWENS is capable of axial flow turbines/HAWTs, but it is not a mature feature, and no where near as developed as OpenFAST (i.e. for regular HAWTs it is recommended to use that software).

<img src="docs/src/assets/biwing.png" alt="drawing" width="400"/>

Then, floating turbines are a possibility, though this feature adds another dimension to the nonlinear time stepping convergance and in turn a fair amount of time. Future work is to make this general interface and functionality an easy to use feature (right now it needs a high level of experience to use).

<img src="docs/src/assets/arcus.png" alt="drawing" width="400"/>


# OWENS under the hood

The OWENS.jl package contains functions and interfaces related to the ontology (how everything comes together, forms a wind turbine, and operates like a wind turbine), with preprocessing and postprocessing helper functions. These include automated meshing functions, sectional property mapping, two-way loads mapping, generalized torque and direct mesh controls, algorithms for two-way coupling and time stepping, fatigue and design equivalent load calculation, and all of the ontology and coupling to the other packages used.

OWENSPrecomp.jl is a translation of Precomp and calculates the sectional properties

Composites.jl provides classical laminate theory definitions used for both pre and post processing

OWENSFEA.jl is one of the structural models including a Timoshenko beam solver in the linear and nonlinear steady, modal, time domain, and reduced order modal domains.

GXBeam.jl has also been integrated for geometrically exact beam solutions of the same above

The aerodynamics are provided by the OWENSAero.jl module, or optionally OpenFAST OLAF via OWENSOpenFASTWrappers.jl

Floating dynamics are provided by OWENSOpenFASTWrappers.jl and the HydroDyn and MoorDyn libraries

Turbulent inflow is provided by OWENSOpenFASTWrappers.jl and the inflowwind and turbsim libraries

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

## Documentation
- https://sandialabs.github.io/OWENS.jl
- All of the functions have docstrings describing the i/o and function purpose, which can be accessed the docs site or by:
* import module
* ? module.function()
- A note about julia debuggers – if you don’t want it to step through everything, you need to tell it what packages to compile vs while packages to step through. This will make the debugger comparable (if not faster) than Matlab in speed. In VSCode, this can be done in the debug pane.

## Software License

Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
Under the terms of Contract DE-NA0003525 with NTESS, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government.
Export of this data may require a license from the United States Government.

See Copyright.txt file for more information
Binary file added docs/src/assets/SNL34m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/arcus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/biwing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/helical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/src/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Optimization Considerations

My text

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

my text
52 changes: 45 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,52 @@
# OWENS (Offshore Wind ENergy Simulator)
# OWENS (Onshore/Offshore Wind/Water ENergy Simulator)

This repository is based on the original structural dynamics solver by Brian Owens (see dissertation: http://hdl.handle.net/1969.1/151813).
The original code has been translated to Julia and revised for simplicity and performance while maintaining accuracy. GXBeam.jl has also been integrated in beta form for geometrically exact beam solutions
The aerodynamics are provided by the OWENSAero.jl module (https://gitlab.sandia.gov/8821-vawt-tools/OWENSAero.jl) in addition to a coupling to the OpenFAST AeroDyn module.
This package was based on the original structural dynamics solver by Brian Owens (see dissertation: http://hdl.handle.net/1969.1/151813). However, it has been rewritten into the Julia programming language and many of the issues related to aerodynamic coupling and floating dynamics solved, with extensive expansion into other areas and features to provide a seamless and automated process that takes in high level design details and does all of the preprocessing, running, and post processing that is normally done under different roofs or by different manual processes. This was done with the intent of enabling fast, parametric design. We have many of the modules propogating automatic gradients, however this is still a future challenge to solve well.

## Documentation
This package is for experienced researchers with both software and engineering experience who need generalized flexibility and performance that is 100% open source. If you want a windows compatible GUI, please use QBlade from our friends across the pond.

Here are several examples of OWENS use cases, current and past, including the Sandia 34m research turbine.

<img src="assets/SNL34m.png" alt="drawing" width="400"/>

Then here is an example of a helical design. Note that arbitrary numbers of struts can be specified in the automatic meshing functions. You can also write your own generalized mesh using the internal building blocks, but it is not thouroughly documented.

<img src="assets/helical.png" alt="drawing" width="400"/>

The generalized meshing was modified to include HAWT concepts, like this bi-wing concept. OWENS is capable of axial flow turbines/HAWTs, but it is not a mature feature, and no where near as developed as OpenFAST (i.e. for regular HAWTs it is recommended to use that software).

<img src="assets/biwing.png" alt="drawing" width="400"/>

Then, floating turbines are a possibility, though this feature adds another dimension to the nonlinear time stepping convergance and in turn a fair amount of time. Future work is to make this general interface and functionality an easy to use feature (right now it needs a high level of experience to use).

<img src="assets/arcus.png" alt="drawing" width="400"/>


# OWENS under the hood

In Work: Documentation can be found in the docs folder along with the validation paper(s).
The OWENS.jl package contains functions and interfaces related to the ontology (how everything comes together, forms a wind turbine, and operates like a wind turbine), with preprocessing and postprocessing helper functions. These include automated meshing functions, sectional property mapping, two-way loads mapping, generalized torque and direct mesh controls, algorithms for two-way coupling and time stepping, fatigue and design equivalent load calculation, and all of the ontology and coupling to the other packages used.

OWENSPrecomp.jl is a translation of Precomp and calculates the sectional properties

Composites.jl provides classical laminate theory definitions used for both pre and post processing

OWENSFEA.jl is one of the structural models including a Timoshenko beam solver in the linear and nonlinear steady, modal, time domain, and reduced order modal domains.

GXBeam.jl has also been integrated for geometrically exact beam solutions of the same above

The aerodynamics are provided by the OWENSAero.jl module, or optionally OpenFAST OLAF via OWENSOpenFASTWrappers.jl

Floating dynamics are provided by OWENSOpenFASTWrappers.jl and the HydroDyn and MoorDyn libraries

Turbulent inflow is provided by OWENSOpenFASTWrappers.jl and the inflowwind and turbsim libraries

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

## Documentation

- All of the functions have docstrings describing the i/o and function purpose, which can be accessed by:
- All of the functions have docstrings describing the i/o and function purpose, which can be accessed the docs site or by:
* import module
* ? module.function()
- A note about julia debuggers – if you don’t want it to step through everything, you need to tell it what packages to compile vs while packages to step through. This will make the debugger comparable (if not faster) than Matlab in speed. In VSCode, this can be done in the debug pane.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate/B_detailedInputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng, A
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
Expand Down
22 changes: 10 additions & 12 deletions docs/src/literate/C_customizablePreprocessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ stack_layers_bld = nothing
stack_layers_scale = [1.0,1.0]
chord_scale = [1.0,1.0]
thickness_scale = [1.0,1.0]
Ht=towerHeight
Htwr_base=towerHeight
strut_mountpointbot = 0.11
strut_mountpointtop = 0.11
strut_mountpointtop = 0.89
joint_type = 0
c_mount_ratio = 0.05
angularOffset = -pi/2
Expand Down Expand Up @@ -126,8 +126,8 @@ nothing
### Set up mesh
#########################################
if meshtype == "ARCUS" #TODO, for all of these propogate the AeroDyn additional output requirements
mymesh,myort,myjoint = OWENS.create_arcus_mesh(;Ht,
Hb = H, #blade height
mymesh,myort,myjoint = OWENS.create_arcus_mesh(;Htwr_base,
Hbld = H, #blade height
R, # m bade radius
nblade = Nbld,
ntelem, #tower elements
Expand All @@ -147,18 +147,16 @@ elseif meshtype == "Darrieus" || meshtype == "H-VAWT"
connectBldTips2Twr = false
end

mymesh, myort, myjoint, AD15bldNdIdxRng, AD15bldElIdxRng = OWENS.create_mesh_struts(;Ht,
Hb = H, #blade height
mymesh, myort, myjoint, AD15bldNdIdxRng, AD15bldElIdxRng = OWENS.create_mesh_struts(;Htwr_base,
Hbld = H, #blade height
R, # m bade radius
AD15hubR=2.0,
nblade = Nbld,
ntelem, #tower elements
nbelem, #blade elements
nselem,
strut_twr_mountpointbot = strut_mountpointbot, # This puts struts at top and bottom
strut_twr_mountpointtop = strut_mountpointtop, # This puts struts at top and bottom
strut_bld_mountpointbot = strut_mountpointbot, # This puts struts at top and bottom
strut_bld_mountpointtop = strut_mountpointtop, # This puts struts at top and bottom
strut_twr_mountpoint = [strut_mountpointbot,strut_mountpointtop], # This puts struts at top and bottom
strut_bld_mountpoint = [strut_mountpointbot,strut_mountpointtop], # This puts struts at top and bottom
bshapex = shapeX, #Blade shape, magnitude is irrelevant, scaled based on height and radius above
bshapez = shapeZ,
bshapey = zeros(nbelem+1), # but magnitude for this is relevant
Expand Down Expand Up @@ -526,7 +524,7 @@ if AD15On

OWENSOpenFASTWrappers.writeIWfile(Vinf,ifw_input_file;windINPfilename)

OWENSOpenFASTWrappers.setupTurb(adi_lib,ad_input_file,ifw_input_file,adi_rootname,[shapeX],[shapeZ],[B],[Ht],[mymesh],[myort],[AD15bldNdIdxRng],[AD15bldElIdxRng];
OWENSOpenFASTWrappers.setupTurb(adi_lib,ad_input_file,ifw_input_file,adi_rootname,[shapeX],[shapeZ],[B],[Htwr_base],[mymesh],[myort],[AD15bldNdIdxRng],[AD15bldElIdxRng];
rho = rho,
adi_dt = delta_t,
adi_tmax= numTS*delta_t,
Expand All @@ -552,7 +550,7 @@ nothing
# Calculate mass breakout of each material
mass_breakout_bld = OWENS.get_material_mass(plyprops_bld,numadIn_bld)
mass_breakout_blds = mass_breakout_bld.*length(mymesh.structuralNodeNumbers[:,1])
mass_breakout_twr = OWENS.get_material_mass(plyprops_twr,numadIn_twr;int_start=0.0,int_stop=Ht)
mass_breakout_twr = OWENS.get_material_mass(plyprops_twr,numadIn_twr;int_start=0.0,int_stop=Htwr_base)

################################
##### End setupOWENS
Expand Down
6 changes: 3 additions & 3 deletions examples/SNL34m/Example34mHVAWTConfiguration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.25,
strut_mountpointtop = 0.25,
strut_twr_mountpoint = [0.25,0.75],
strut_bld_mountpoint = [0.26,0.74],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.03,0.97],
strut_bld_mountpoint = [0.03,0.97],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
6 changes: 3 additions & 3 deletions examples/SNL34m/Fig5_11_EmergStop_torque_flatwise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.03,0.97],
strut_bld_mountpoint = [0.03,0.97],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.03,0.97],
strut_bld_mountpoint = [0.03,0.97],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
6 changes: 3 additions & 3 deletions examples/SNL34m/SNL34mVAWTNormalOperation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,# = "$path/data/NuMAD_Materials_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv",
NuMad_geom_xlscsv_file_strut,
NuMad_mat_xlscsv_file_strut,
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.03,0.97],
strut_bld_mountpoint = [0.03,0.97],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
8 changes: 3 additions & 5 deletions examples/SNL5MW/ExampleSNL5MW_turbulent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,14 @@ ntheta,Nslices,rho,eta,RPI=true)
#########################################
println("Create Mesh")
mymesh,myort,myjoint = OWENS.create_mesh_struts(;Ht=15.0,
Hb = H, #blade height
Hbld = H, #blade height
R, # m bade radius
nblade = 2,
ntelem = 30, #tower elements
nbelem = 60, #blade elements
nselem = 10,
strut_twr_mountpointbot = 0.1, # This puts struts at top and bottom
strut_twr_mountpointtop = 0.1, # This puts struts at top and bottom
strut_bld_mountpointbot = 0.1, # This puts struts at top and bottom
strut_bld_mountpointtop = 0.1, # This puts struts at top and bottom
strut_twr_mountpoint = [0.1,0.9], # This puts struts at top and bottom
strut_bld_mountpoint = [0.1,0.9], # This puts struts at top and bottom
bshapex = shapeX, #Blade shape, magnitude is irrelevant, scaled based on height and radius above
bshapez = shapeZ,
angularOffset = -pi/2) #Blade shape, magnitude is irrelevant, scaled based on height and radius above
Expand Down
6 changes: 3 additions & 3 deletions examples/dev/OptimizationExample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections = OWENS.setupOWE
NuMad_mat_xlscsv_file_bld,#windio
NuMad_geom_xlscsv_file_strut,#windio
NuMad_mat_xlscsv_file_strut,#windio
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.1,0.9],
strut_bld_mountpoint = [0.05,0.95],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
6 changes: 3 additions & 3 deletions examples/dev/RM2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ mass_breakout_blds,mass_breakout_twr,system, assembly, sections,AD15bldNdIdxRng,
NuMad_mat_xlscsv_file_bld,#windio
NuMad_geom_xlscsv_file_strut,#windio
NuMad_mat_xlscsv_file_strut,#windio
Ht=towerHeight,
Htwr_base=towerHeight,
ntelem,
nbelem,
ncelem,
nselem,
joint_type = 0,
strut_mountpointbot = 0.03,
strut_mountpointtop = 0.03,
strut_twr_mountpoint = [0.1,0.9],
strut_bld_mountpoint = [0.05,0.95],
AModel, #AD, DMS, AC
DSModel="BV",
RPI=true,
Expand Down
Loading
Loading