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

Yaml Input File Update #91

Merged
merged 25 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
53dde03
Update Windio example with strut tower and blade mount points
kevmoor Nov 4, 2024
cccbe99
run and fail, but last commit run and pass
kevmoor Nov 4, 2024
227d818
Update Windio to use the unitized span positions which changes the al…
kevmoor Nov 4, 2024
f6a06e4
Complete manual merge
kevmoor Nov 4, 2024
1d3ac88
Add windio to test cases
kevmoor Nov 4, 2024
6a34584
Pull in windio changes that worked at 227d818, but the case doesn't w…
kevmoor Nov 4, 2024
758d047
Switch to TMB fpr debugging
kevmoor Nov 5, 2024
4708dbc
Rebless windio test case after determining the difference was in the …
kevmoor Nov 5, 2024
70f9d49
Update variable names to be more intuitive, begin sorting the full li…
kevmoor Nov 6, 2024
56da7d7
Unify verbosity, move gravity to windio input, rebless windio unit te…
kevmoor Nov 6, 2024
faf7f9f
unify data output filename and data output function, make modal file …
kevmoor Nov 7, 2024
fac318a
Sort inputs, move blade height and radius to derived for WindIO
kevmoor Nov 7, 2024
46dd9b1
Update to use turbsim jll
kevmoor Nov 9, 2024
9460ca7
Resolve last structural components in modeling options that will be h…
kevmoor Nov 11, 2024
18abd34
Merge master
kevmoor Nov 15, 2024
76ab3b0
Add DLC inputs, update DLC defaults, rename turbsim savepath
kevmoor Nov 15, 2024
fb2b987
Assimilate owensaero options and dlc options at the top level windio
kevmoor Nov 15, 2024
96e9c17
Assimilate top level owens inputs into windio run format
kevmoor Nov 15, 2024
01e63d5
Assimilate OWENSFEA inputs into windio run format
kevmoor Nov 15, 2024
47c2524
Assimilate OpenFASTWrappers inputs into windio run format
kevmoor Nov 15, 2024
3e7c7d9
Assimilate mesh and drivetrain options at the top level windio
kevmoor Nov 18, 2024
030e510
Fully use new modeling options with windio, resolve vinf and rpm inpu…
kevmoor Nov 18, 2024
26106e0
Partially running checkpoint, DLC run integrated but runOWENS yet to …
kevmoor Nov 19, 2024
7f9939a
Get windio option running with the DLC run method, update doc strings
kevmoor Nov 22, 2024
ba63fdd
Windio test ended up not being run during the development, log this a…
kevmoor Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ new*
*COMPILED*
*.out
*.h5
*h5*
*.mat
*.png
*.gif
*.pdf
*.csv
*.mp4
*turbsimfiles/
*turbsim*/
*animation/
6 changes: 3 additions & 3 deletions 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 Expand Up @@ -29,10 +29,10 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[sources]
Composites = {url = "https://github.com/byuflowlab/Composites.jl.git"}
OWENSAero = {url = "https://github.com/sandialabs/OWENSAero.jl"}
OWENSFEA = {url = "https://github.com/sandialabs/OWENSFEA.jl"}
OWENSOpenFAST_jll = {url = "https://github.com/sandialabs/OWENSOpenFAST_jll.jl"}
OWENSOpenFASTWrappers = {url = "https://github.com/sandialabs/OWENSOpenFASTWrappers.jl"}
OWENSAero = {url = "https://github.com/sandialabs/OWENSAero.jl"}
OWENSFEA = {url = "https://github.com/sandialabs/OWENSFEA.jl"}

[compat]
DelimitedFiles = "1"
Expand Down
2 changes: 1 addition & 1 deletion app/OWENS_APP/src/sampleOWENS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ controlParameters:
AeroParameters:
Nslices: 30 # number of OWENSAero discritizations #TODO: AD parameters
ntheta: 30 # number of OWENSAero azimuthal discretizations
AModel: AD # AD, DMS, AC
AeroModel: AD # AD, DMS, AC
adi_lib: /Users/kevmoor/Documents/coderepos/openfast/build/modules/aerodyn/libaerodyn_inflow_c_binding
adi_rootname: "/ExampleB"

Expand Down
7 changes: 7 additions & 0 deletions docs/src/OWENS_Dev_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ displacements$_\text{guess}$ with the calculated displacements
[]{#alg:Transient label="alg:Transient"}
:::

# WindIO Usage
The majority of the WindIO standard can be used for the structural and aerodynamic design. Airfoil polars are forthcoming. However, there are the following additional and limitations:
- Gravity single value or array of 3, is in the global frame of reference, so positive gravity would be pulling the structure up.
- Start and end nd_arc values are the only input supported. Otherwise, there are as many as 12 different ways to specify this input.
- Grids must be defined from end to end, set number of plies to 1e-6 at unused spanwise sections.
- The blade object is reused for the tower, struts, cables, etc. since these elements can be modeled at the same fidelity as the blade and can be simplified via simpler inputs, but the other WindIO definitions don't allow for the more complex inputs.

# Global Frame of Reference

Thanks to some legacy VAWT frames of reference where wind was originally
Expand Down
6 changes: 3 additions & 3 deletions docs/src/VAWTGenUserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ height="3.3866666666666667in"}
> A similar capability exists for generating animated mode shapes. The
> vizAnimateModal function is utilized in the following manner:
>
> vizAnimateModal(meshFile,resultsFile,selectedMode,sf,outFileName);
> vizAnimateModal(meshFile,resultsFile,selectedMode,sf,dataOutputFilename);
>
> All the input parameters are the same as those for viz, however, the
> last parameter specifies a file name for a AVI movie file.
Expand All @@ -884,12 +884,12 @@ height="3.3866666666666667in"}
> vizAnimateTransient function. The command line argument is executed
> as:
>
> vizAnimateTransient(meshFile,uData,sf,outFileName);
> vizAnimateTransient(meshFile,uData,sf,dataOutputFilename);
>
> Such that mesh file is the mesh filename (.mesh), uData is an n x m
> array holding displacement data for n degrees of freedom at m time
> steps, and sf is the deformation scale factor for the structural mesh.
> The AVI movie file is generated using outFileName.
> The AVI movie file is generated using dataOutputFilename.

# VAWTGen Output Files

Expand Down
7 changes: 4 additions & 3 deletions docs/src/indepth_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Pkg.add(PackageSpec(url="https://github.com/sandialabs/OWENS.jl.git"))
Note that there are many packages used in the examples. While they are installed within the OWENS.jl environment, if you want to additionally install them in your 1.11+ environment where you will likely be running from:
```julia
using Pkg
Pkg.add(["Statistics","Dierckx","QuadGK","FLOWMath","HDF5","ImplicitAD","GXBeam","DelimitedFiles","Statistics","FFTW"])
Pkg.add(["Statistics","Dierckx","QuadGK","FLOWMath","HDF5","ImplicitAD","GXBeam","DelimitedFiles","FFTW","YAML","OrderedCollections"])
```

If you want to show any of the plots in the examples, they currently use the PyPlot interface, which means that julia has to install its own conda in the back end, which can take some time. Alternatively, you can point to your own python if desired.
Expand All @@ -257,9 +257,10 @@ println("\n#####################")
println("Install OWENS")
println("#####################")

Pkg.add(["Statistics","Dierckx","QuadGK","FLOWMath","HDF5","ImplicitAD","GXBeam","DelimitedFiles","Statistics","FFTW",
Pkg.add(["Statistics","Dierckx","QuadGK","FLOWMath","HDF5","ImplicitAD","GXBeam","DelimitedFiles","FFTW","YAML","OrderedCollections"])

Pkg.add([
PackageSpec(url="https://github.com/byuflowlab/Composites.jl.git"),
PackageSpec(url="https://github.com/sandialabs/OWENSPreComp.jl.git"),
PackageSpec(url="https://github.com/sandialabs/OWENSOpenFAST_jll.jl.git"),
PackageSpec(url="https://github.com/sandialabs/OWENSOpenFASTWrappers.jl.git"),
PackageSpec(url="https://github.com/sandialabs/OWENSAero.jl.git"),
Expand Down
Binary file modified examples/AddedMass_Buoyancy/300mx300m12msETM_Coarse.bts
Binary file not shown.
18 changes: 9 additions & 9 deletions examples/AddedMass_Buoyancy/Buoyancy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ nbelem = 60
ncelem = 10
nselem = 10
ifw = false
AModel = "DMS"
AeroModel = "DMS"
windINPfilename = "$path/300mx300m12msETM_Coarse.bts"
ifw_libfile = nothing#"$path/../../openfast/build/modules/inflowwind/libifw_c_binding"
Blade_Height = 20.0
Expand Down Expand Up @@ -130,8 +130,8 @@ mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng,AD
c_mount_ratio = 0.05,
strut_twr_mountpoint = [0.5],
strut_bld_mountpoint = [0.5],
AModel, #AD, DMS, AC
DSModel="BV",
AeroModel, #AD, DMS, AC
DynamicStallModel="BV",
Aero_AddedMass_Active,
AddedMass_Coeff_Ca=0.0,
Aero_RotAccel_Active,
Expand Down Expand Up @@ -209,13 +209,13 @@ nothing

# There are inputs for the overall coupled simulation, please see the api reference for specifics on all the options

if AModel=="AD"
if AeroModel=="AD"
AD15On = true
else
AD15On = false
end

inputs = OWENS.Inputs(;analysisType = structuralModel,
inputs = OWENS.Inputs(;verbosity,analysisType = structuralModel,
tocp,
Omegaocp,
tocp_Vinf,
Expand Down Expand Up @@ -312,7 +312,7 @@ initTopConditions[length(displace_y)+1:end,2] .= 5
initTopConditions[length(displace_y)+1:end,3] = curve_y

feamodel = OWENS.FEAModel(;analysisType = structuralModel,
outFilename = "none",
dataOutputFilename = "none",
joint = myjoint,
platformTurbineConnectionNodeNumber = 1,
pBC,
Expand All @@ -332,7 +332,7 @@ nothing

println("Running Unsteady")
topdata = OWENS.Unsteady_Land(inputs;system,assembly,returnold=false,
topModel=feamodel,topMesh=mymesh,topEl=myel,aero=flappingForces,deformAero,verbosity)
topModel=feamodel,topMesh=mymesh,topEl=myel,aero=flappingForces,deformAero)
t = topdata.t
aziHist = topdata.aziHist
OmegaHist = topdata.OmegaHist
Expand Down Expand Up @@ -409,9 +409,9 @@ println("Percent Diff = $percentdiff%")
# for example, strain, or reaction force, etc. This is described in more detail in the api reference for the function and: TODO


# saveName = "$path/vtk/flapping_buoyancy"
# VTKsaveName = "$path/vtk/flapping_buoyancy"
# tsave_idx=1:1:numTS-1
# OWENS.OWENSVTK(saveName,t,uHist,system,assembly,sections,aziHist,mymesh,myel,
# OWENS.OWENSVTK(VTKsaveName,t,uHist,system,assembly,sections,aziHist,mymesh,myel,
# epsilon_x_hist,epsilon_y_hist,epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist,
# FReactionHist,topFexternal_hist;tsave_idx)

Expand Down
18 changes: 9 additions & 9 deletions examples/AddedMass_Buoyancy/Flapping_Added_Mass.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ nbelem = 60
ncelem = 10
nselem = 10
ifw = false
AModel = "DMS"
AeroModel = "DMS"
windINPfilename = "$path/300mx300m12msETM_Coarse.bts"
ifw_libfile = nothing#"$path/../../openfast/build/modules/inflowwind/libifw_c_binding"
Blade_Height = 20.0
Expand Down Expand Up @@ -131,8 +131,8 @@ mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng,AD
c_mount_ratio = 0.05,
strut_twr_mountpoint = [0.5],
strut_bld_mountpoint = [0.5],
AModel, #AD, DMS, AC
DSModel="BV",
AeroModel, #AD, DMS, AC
DynamicStallModel="BV",
Aero_AddedMass_Active,
AddedMass_Coeff_Ca,
Aero_RotAccel_Active,
Expand Down Expand Up @@ -227,13 +227,13 @@ nothing

# There are inputs for the overall coupled simulation, please see the api reference for specifics on all the options

if AModel=="AD"
if AeroModel=="AD"
AD15On = true
else
AD15On = false
end

inputs = OWENS.Inputs(;analysisType = structuralModel,
inputs = OWENS.Inputs(;verbosity,analysisType = structuralModel,
tocp,
Omegaocp,
tocp_Vinf,
Expand Down Expand Up @@ -327,7 +327,7 @@ initTopConditions[length(displace_y)+1:end,2] .= 5
initTopConditions[length(displace_y)+1:end,3] = curve_y

feamodel = OWENS.FEAModel(;analysisType = structuralModel,
outFilename = "none",
dataOutputFilename = "none",
joint = myjoint,
platformTurbineConnectionNodeNumber = 1,
pBC,
Expand All @@ -348,7 +348,7 @@ nothing

println("Running Unsteady")
topdata = OWENS.Unsteady_Land(inputs;system,assembly,returnold=false,
topModel=feamodel,topMesh=mymesh,topEl=myel,aero=flappingForces,deformAero,verbosity)
topModel=feamodel,topMesh=mymesh,topEl=myel,aero=flappingForces,deformAero)
t = topdata.t
aziHist = topdata.aziHist
OmegaHist = topdata.OmegaHist
Expand Down Expand Up @@ -449,9 +449,9 @@ println("percent_diff: $percentdiff%")
# for example, strain, or reaction force, etc. This is described in more detail in the api reference for the function and: TODO

# azi=aziHist#./aziHist*1e-6
# saveName = "$path/vtk/flapping_added_mass"
# VTKsaveName = "$path/vtk/flapping_added_mass"
# tsave_idx=1:1:numTS-1
# OWENS.OWENSVTK(saveName,t,uHist,system,assembly,sections,aziHist,mymesh,myel,
# OWENS.OWENSVTK(VTKsaveName,t,uHist,system,assembly,sections,aziHist,mymesh,myel,
# epsilon_x_hist,epsilon_y_hist,epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist,
# FReactionHist,topFexternal_hist;tsave_idx)

Expand Down
2 changes: 1 addition & 1 deletion examples/AddedMass_Buoyancy/modeling_options_OWENS_RM2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ controlParameters:
AeroParameters:
Nslices: 30 # number of OWENSAero discritizations #TODO: AD parameters
ntheta: 30 # number of OWENSAero azimuthal discretizations
AModel: AD # AD, DMS, AC
AeroModel: AD # AD, DMS, AC
adi_lib: nothing
adi_rootname: "/RM2"

Expand Down
Binary file added examples/Optimization/InitialDataOutputs_UNIT.h5
Binary file not shown.
63 changes: 63 additions & 0 deletions examples/Optimization/OWENS_Opt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
OWENS_Options:
analysisType: "Unsteady" # Unsteady, DLC, Campbell, todo: steady, flutter may be re-activated in the future.
AeroModel: "DMS" # OWENSAero model "DMS" for double multiple streamtube or "AC" for actuator cylinder, or "AD" for aerodyn
structuralModel: "TNB" #Structural models available: TNB full timoshenko beam elements with time newmark beta time stepping, ROM reduced order modal model of the timoshenko elements, GX with GXBeam's methods for geometrically exact beam theory and more efficient methods and time stepping
controlStrategy: "prescribedRPM" # should be in WindIO?- yes,
numTS: 20 # number of time steps TODO: change to sim time and make this derived
delta_t: 0.01 # time step in seconds
dataOutputFilename: "./InitialDataOutputs.out" # data output filename with path, set to nothing or don't specify to not output anything
TOL: 1e-4 # gauss-seidel iteration tolerance - i.e. the two-way iteration tolerance
MAXITER: 300 # gauss-seidel max iterations - i.e. the two-way iterations
verbosity: 2 # verbosity where 0 is nothing, 1 is warnings, 2 is summary outputs, 3 is detailed outputs, and 4 is everything
VTKsaveName: "./vtk/windio" # Path and name of the VTK outputs, recommended to put it in its own folder (which it will automatically create if needed)
aeroLoadsOn: 2 # Level of aero coupling 0 structures only, 1 no deformation passed to the aero, 2 two-way coupling, 1.5 last time step's deformations passed to this timesteps aero and no internal iteration.
Prescribed_RPM_time_controlpoints: [0.0,100000.1]
Prescribed_RPM_RPM_controlpoints: [17.2,17.2]
Prescribed_Vinf_time_controlpoints: [0.0,100000.1]
Prescribed_Vinf_Vinf_controlpoints: [17.2,17.2]

DLC_Options:
DLCs: ["1_1","2_1"] # name of DLC
Vinf_range: [17.2] # inflow Cutin to cutout and discretization
IEC_std: "\"1-ED3\"" # turbsim input file IEC standard
WindChar: "\"A\"" # turbsim wind charasteric
WindClass: 1 # turbsim wind class
turbsimsavepath: "./turbsimfiles" # path where the turbsim files are saved
pathtoturbsim: nothing # path to the turbsim executable
NumGrid_Z: 38 # turbsim vertical discretizations
NumGrid_Y: 26 # turbsim horizontal discretizations
Vref: 17.2 # reference/nominal wind speed m/s for turbsim or other inflow wind input file (depending on which DLC is selected)
Vdesign: 11.0 # Design or rated speed of turbine, used for certain DLC cases
grid_oversize: 1.1 # amount that the turbsim inflow is oversized compared to the turbine to allow for deflection
regenWindFiles: false #, force regeneration of turbsim files even if they already exist
delta_t_turbsim: 0.05 # turbsim timestep
simtime_turbsim: 600.0 # turbsim total time, which loops if simtime exceeds turbsim time

OWENSAero_Options:
Nslices: 30 # number of 3-D slices for the strip method to go from 2D to 3D considering curved deforming blades
ntheta: 30 # number of azimuthal discretizations
ifw: false # use the OpenFASTWrappers inflow wind coupling to get inflow velocities
DynamicStallModel: "BV" # dynamic stall model, should be under an OWENSAero options
RPI: true # rotating point iterative method (i.e. it just calculates at the blade positions and is much faster)
Aero_Buoyancy_Active: false # flag to turn buoyancy on for the blades. This is likely to be replaced by a different model

OWENSFEA_Options:
nlOn: true #nonlinear effects
RayleighAlpha: 0.05 #damping coefficient scalar on the stiffness matrix
RayleighBeta: 0.05 #damping coefficient scalar on the mass matrix
iterationType: "DI" #internal iteration type DI direct iteration, NR newton rhapson (which is less stable than DI)
numModes: 20 #if ROM model, number of modes used in the analysis type. Less is faster but less accurate
tolerance: 1.0e-06 #total mesh unsteady analysis convergence tolerance for a timestep within the structural model
maxIterations: 50 #total mesh unsteady analysis convergence max iterations for a timestep
AddedMass_Coeff_Ca: 0.0 #added mass coefficient, scaling factor (typically 0-1) on the cones of water mass applied to each structural element in the 22 and 33 diagonal terms. 0 turns this off

Mesh_Options:
ntelem: 10 # number of tower elements in each blade, plus nodes wherever there is a component overlap
nbelem: 60 # number of blade elements in each blade, plus nodes wherever there is a component overlap
nselem: 5 # number of elements in each strut
angularOffset: -1.5707963267948966
AD15hubR: 0.1 # parameter, used in aerodyn coupling for the hub radius so that the vortex sheets don't go within the hub
turbineType: Darrieus

OWENSOpenFASTWrappers_Options:
windINPfilename: /data/turbsim/115mx115m_30x30_20.0msETM.bts #OWENSOpenFASTWrappers If ifw or AeroDyn is being used, gets overwritten if using the DLC analysis type, the moordyn file location, like in the unit test
Loading