diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 00000000..350e8f83 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,37 @@ +name: CI +on: + push: + branches: + - master + tags: '*' + pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1.6' + - '1' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 + - name: Install OpenFASTWrappers + run: julia --project=./ -e 'using Pkg; 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/OWENSOpenFASTWrappers.jl.git"),PackageSpec(url="https://github.com/sandialabs/OWENSAero.jl.git"),PackageSpec(url="https://github.com/sandialabs/OWENSFEA.jl.git")])' + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 00000000..da266b9a --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -0,0 +1,16 @@ +name: CompatHelper +on: + schedule: + - cron: '00 00 * * *' + workflow_dispatch: +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Pkg.add("CompatHelper") + run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + - name: CompatHelper.main() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + run: julia -e 'using CompatHelper; CompatHelper.main()' diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml new file mode 100644 index 00000000..15628485 --- /dev/null +++ b/.github/workflows/Documentation.yml @@ -0,0 +1,28 @@ +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + build: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - name: Install dependencies + env: + PYTHON: "" + run: julia --project=docs/ -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/byuflowlab/Composites.jl.git"));Pkg.add(PackageSpec(url="https://github.com/sandialabs/OWENSPreComp.jl.git"));Pkg.add(PackageSpec(url="https://github.com/sandialabs/OWENSOpenFASTWrappers.jl.git"));Pkg.add(PackageSpec(url="https://github.com/sandialabs/OWENSAero.jl.git")); Pkg.add(PackageSpec(url="https://github.com/sandialabs/OWENSFEA.jl.git")); Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key + run: julia --project=docs/ docs/make.jl diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 00000000..f49313b6 --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,15 @@ +name: TagBot +on: + issue_comment: + types: + - created + workflow_dispatch: +jobs: + TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/README.md b/README.md index 47a38187..e9f60bac 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,17 @@ # OWENS (Onshore/Offshore Wind/Water ENergy Simulator) +[![](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. -## Documentation -Until public hosting of the documentation is set up, a readthedocs style webpage can be built via: - - cd path2OWENS.jl/OWENS.jl/docs - julia --project make.jl - -and then a local server can be started via - - cd .. - julia -e 'using LiveServer; serve(dir="docs/build")' - -then open your favorite browser and open the following (or what is indicated in the terminal output if different) - - http://localhost:8000/ +## Examples +Please see the documentation under examples. -Note that you may need to install julia packages as directed in the terminal output if you are building the docs for the first time. +## Installation +Please see the documentation under setup. ## 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. diff --git a/docs/Project.toml b/docs/Project.toml index e69de29b..238937a6 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -0,0 +1,9 @@ +[deps] +BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" +ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" +Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb" + +[extras] +CPUSummary = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" \ No newline at end of file diff --git a/docs/make.jl b/docs/make.jl index 789f2c5b..ad09cd3b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -25,6 +25,10 @@ makedocs(; remotes = nothing ) +deploydocs( + repo = "github.com/sandialabs/OWENS.jl.git", +) + # ## Documentation # Until public hosting of the documentation is set up, a readthedocs style webpage can be built via: diff --git a/docs/src/literate/A_simplyRunningOWENS.jl b/docs/src/literate/A_simplyRunningOWENS.jl index 35a788b7..eb516c0d 100644 --- a/docs/src/literate/A_simplyRunningOWENS.jl +++ b/docs/src/literate/A_simplyRunningOWENS.jl @@ -21,8 +21,8 @@ import OWENS -runpath = "./" #splitdir(@__FILE__)[1] +runpath = "./" #splitdir(@__FILE__)[1] -Inp = OWENS.MasterInput("./sampleOWENS.yml") +Inp = OWENS.MasterInput("$runpath/sampleOWENS.yml") OWENS.runOWENS(Inp,runpath) \ No newline at end of file diff --git a/docs/src/literate/B_detailedInputs.jl b/docs/src/literate/B_detailedInputs.jl index d03184d8..72ef24fb 100644 --- a/docs/src/literate/B_detailedInputs.jl +++ b/docs/src/literate/B_detailedInputs.jl @@ -20,7 +20,7 @@ import OWENSAero path = runpath = "./" #splitdir(@__FILE__)[1] -Inp = OWENS.MasterInput("./sampleOWENS.yml") +Inp = OWENS.MasterInput("$runpath/sampleOWENS.yml") nothing @@ -45,21 +45,28 @@ nbelem = Inp.nbelem ncelem = Inp.ncelem nselem = Inp.nselem ifw = Inp.ifw +WindType = Inp.WindType AModel = Inp.AModel -windINPfilename = Inp.windINPfilename +windINPfilename = "$(path)$(Inp.windINPfilename)" ifw_libfile = Inp.ifw_libfile +if ifw_libfile == "nothing" + ifw_libfile = nothing +end Blade_Height = Inp.Blade_Height Blade_Radius = Inp.Blade_Radius numTS = Inp.numTS delta_t = Inp.delta_t -NuMad_geom_xlscsv_file_twr = Inp.NuMad_geom_xlscsv_file_twr -NuMad_mat_xlscsv_file_twr = Inp.NuMad_mat_xlscsv_file_twr -NuMad_geom_xlscsv_file_bld = Inp.NuMad_geom_xlscsv_file_bld -NuMad_mat_xlscsv_file_bld = Inp.NuMad_mat_xlscsv_file_bld -NuMad_geom_xlscsv_file_strut = Inp.NuMad_geom_xlscsv_file_strut -NuMad_mat_xlscsv_file_strut = Inp.NuMad_mat_xlscsv_file_strut +NuMad_geom_xlscsv_file_twr = "$(path)$(Inp.NuMad_geom_xlscsv_file_twr)" +NuMad_mat_xlscsv_file_twr = "$(path)$(Inp.NuMad_mat_xlscsv_file_twr)" +NuMad_geom_xlscsv_file_bld = "$(path)$(Inp.NuMad_geom_xlscsv_file_bld)" +NuMad_mat_xlscsv_file_bld = "$(path)$(Inp.NuMad_mat_xlscsv_file_bld)" +NuMad_geom_xlscsv_file_strut = "$(path)$(Inp.NuMad_geom_xlscsv_file_strut)" +NuMad_mat_xlscsv_file_strut = "$(path)$(Inp.NuMad_mat_xlscsv_file_strut)" adi_lib = Inp.adi_lib -adi_rootname = Inp.adi_rootname +if adi_lib == "nothing" + adi_lib = nothing +end +adi_rootname = "$(path)$(Inp.adi_rootname)" B = Nbld R = Blade_Radius#177.2022*0.3048 #m @@ -77,7 +84,7 @@ mymesh,myel,myort,myjoint,sectionPropsArray,mass_twr, mass_bld, stiff_twr, stiff_bld,bld_precompinput, bld_precompoutput,plyprops_bld,numadIn_bld,lam_U_bld,lam_L_bld, twr_precompinput,twr_precompoutput,plyprops_twr,numadIn_twr,lam_U_twr,lam_L_twr,aeroForces,deformAero, -mass_breakout_blds,mass_breakout_twr,system,assembly,sections = OWENS.setupOWENS(OWENSAero,path; +mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng, AD15bldElIdxRng = OWENS.setupOWENS(OWENSAero,path; rho, Nslices, ntheta, @@ -90,6 +97,7 @@ mass_breakout_blds,mass_breakout_twr,system,assembly,sections = OWENS.setupOWENS shapeY, shapeX, ifw, + WindType, delta_t, numTS, adi_lib, @@ -191,8 +199,7 @@ nlOn = true, numNodes = mymesh.numNodes, RayleighAlpha = 0.05, RayleighBeta = 0.05, -iterationType = "DI", -predef = "update") +iterationType = "DI") nothing @@ -225,25 +232,15 @@ nothing massOwens,stress_U,SF_ult_U,SF_buck_U,stress_L,SF_ult_L,SF_buck_L,stress_TU,SF_ult_TU, SF_buck_TU,stress_TL,SF_ult_TL,SF_buck_TL,topstrainout_blade_U,topstrainout_blade_L, -topstrainout_tower_U,topstrainout_tower_L = OWENS.extractSF(bld_precompinput, +topstrainout_tower_U,topstrainout_tower_LtopDamage_blade_U, +topDamage_blade_L,topDamage_tower_U,topDamage_tower_L = OWENS.extractSF(bld_precompinput, bld_precompoutput,plyprops_bld,numadIn_bld,lam_U_bld,lam_L_bld, twr_precompinput,twr_precompoutput,plyprops_twr,numadIn_twr,lam_U_twr,lam_L_twr, mymesh,myel,myort,Nbld,epsilon_x_hist,kappa_y_hist,kappa_z_hist,epsilon_z_hist, kappa_x_hist,epsilon_y_hist;verbosity, #Verbosity 0:no printing, 1: summary, 2: summary and spanwise worst safety factor # epsilon_x_hist_1,kappa_y_hist_1,kappa_z_hist_1,epsilon_z_hist_1,kappa_x_hist_1,epsilon_y_hist_1, LE_U_idx=1,TE_U_idx=6,SparCapU_idx=3,ForePanelU_idx=2,AftPanelU_idx=5, LE_L_idx=1,TE_L_idx=6,SparCapL_idx=3,ForePanelL_idx=2,AftPanelL_idx=5, -Twr_LE_U_idx=1,Twr_LE_L_idx=1) #TODO: add in ability to have material safety factors and load safety factors - -nothing - -# The following sections are in work: TODO +Twr_LE_U_idx=1,Twr_LE_L_idx=1, +AD15bldNdIdxRng,AD15bldElIdxRng,strut_precompoutput=nothing) #TODO: add in ability to have material safety factors and load safety factors -########################################## -#### Fatigue ##### -########################################## - -##### DEL - -########################################## -#### Data Dump in OpenFAST Format ##### -########################################## +nothing \ No newline at end of file diff --git a/docs/src/literate/C_customizablePreprocessing.jl b/docs/src/literate/C_customizablePreprocessing.jl index 084b67a7..e9cf92ce 100644 --- a/docs/src/literate/C_customizablePreprocessing.jl +++ b/docs/src/literate/C_customizablePreprocessing.jl @@ -22,9 +22,13 @@ PyPlot.pygui(true) import OWENSOpenFASTWrappers -path = runpath = "./" #splitdir(@__FILE__)[1] +path = runpath = "./" #splitdir(@__FILE__)[1] -Inp = OWENS.MasterInput("./sampleOWENS.yml") +Inp = OWENS.MasterInput("$runpath/sampleOWENS.yml") + +nothing + +# Unpack inputs, or you could directly input them here and bypass the file verbosity = 1 @@ -45,21 +49,28 @@ nbelem = Inp.nbelem ncelem = Inp.ncelem nselem = Inp.nselem ifw = Inp.ifw +WindType = Inp.WindType AModel = Inp.AModel -windINPfilename = Inp.windINPfilename +windINPfilename = "$(path)$(Inp.windINPfilename)" ifw_libfile = Inp.ifw_libfile +if ifw_libfile == "nothing" + ifw_libfile = nothing +end Blade_Height = Inp.Blade_Height Blade_Radius = Inp.Blade_Radius numTS = Inp.numTS delta_t = Inp.delta_t -NuMad_geom_xlscsv_file_twr = Inp.NuMad_geom_xlscsv_file_twr -NuMad_mat_xlscsv_file_twr = Inp.NuMad_mat_xlscsv_file_twr -NuMad_geom_xlscsv_file_bld = Inp.NuMad_geom_xlscsv_file_bld -NuMad_mat_xlscsv_file_bld = Inp.NuMad_mat_xlscsv_file_bld -NuMad_geom_xlscsv_file_strut = Inp.NuMad_geom_xlscsv_file_strut -NuMad_mat_xlscsv_file_strut = Inp.NuMad_mat_xlscsv_file_strut +NuMad_geom_xlscsv_file_twr = "$(path)$(Inp.NuMad_geom_xlscsv_file_twr)" +NuMad_mat_xlscsv_file_twr = "$(path)$(Inp.NuMad_mat_xlscsv_file_twr)" +NuMad_geom_xlscsv_file_bld = "$(path)$(Inp.NuMad_geom_xlscsv_file_bld)" +NuMad_mat_xlscsv_file_bld = "$(path)$(Inp.NuMad_mat_xlscsv_file_bld)" +NuMad_geom_xlscsv_file_strut = "$(path)$(Inp.NuMad_geom_xlscsv_file_strut)" +NuMad_mat_xlscsv_file_strut = "$(path)$(Inp.NuMad_mat_xlscsv_file_strut)" adi_lib = Inp.adi_lib -adi_rootname = Inp.adi_rootname +if adi_lib == "nothing" + adi_lib = nothing +end +adi_rootname = "$(path)$(Inp.adi_rootname)" println("Set up Turbine") @@ -139,7 +150,7 @@ elseif meshtype == "Darrieus" || meshtype == "H-VAWT" mymesh, myort, myjoint, AD15bldNdIdxRng, AD15bldElIdxRng = OWENS.create_mesh_struts(;Ht, Hb = H, #blade height R, # m bade radius - AD15hubR = 2.0, #TODO: AD15 file generation + AD15hubR=2.0, nblade = Nbld, ntelem, #tower elements nbelem, #blade elements @@ -160,6 +171,9 @@ else #TODO unify with HAWT end nTwrElem = Int(mymesh.meshSeg[1]) +if contains(NuMad_mat_xlscsv_file_bld,"34m") #TODO: this is really odd, + nTwrElem = Int(mymesh.meshSeg[1])+1 +end nothing @@ -360,8 +374,7 @@ if meshtype == "ARCUS" Nremain = sum(Int,mymesh.meshSeg[Nbld+1+1:end]) #strut elements remain sectionPropsArray = [fill(sectionPropsArray_twr[1],length(sectionPropsArray_twr));bldssecprops; fill(cable_secprop,Nremain)]#;sectionPropsArray_str;sectionPropsArray_str;sectionPropsArray_str;sectionPropsArray_str] - # GXBeam sectional properties - stiff_blds = collect(Iterators.flatten(fill(stiff_bld, Nbld))) + stiff_blds = collect(Iterators.flatten(fill(stiff_bld, Nbld))) # GXBeam sectional properties stiff_cables = fill(stiff_twr[end],Nremain) stiff_array = [stiff_twr; stiff_blds; stiff_cables] @@ -371,8 +384,7 @@ if meshtype == "ARCUS" else sectionPropsArray = [sectionPropsArray_twr; bldssecprops; strutssecprops]#;sectionPropsArray_str;sectionPropsArray_str;sectionPropsArray_str;sectionPropsArray_str] - # GXBeam sectional properties - stiff_blds = collect(Iterators.flatten(fill(stiff_bld, Nbld))) + stiff_blds = collect(Iterators.flatten(fill(stiff_bld, Nbld))) # GXBeam sectional properties stiff_struts = collect(Iterators.flatten(fill(stiff_strut, Nstrutperbld*Nbld))) stiff_array = [stiff_twr; stiff_blds; stiff_struts] @@ -382,9 +394,8 @@ else end rotationalEffects = ones(mymesh.numEl) #TODO: non rotating tower, or rotating blades -#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)#;VTKmeshfilename="ExampleC") +myel = OWENSFEA.El(sectionPropsArray,myort.Length,myort.Psi_d,myort.Theta_d,myort.Twist_d,rotationalEffects) #store data in element object +system, assembly, sections = OWENS.owens_to_gx(mymesh,myort,myjoint,sectionPropsArray,stiff_array,mass_array) nothing @@ -396,15 +407,31 @@ if !AD15On ######################################### chord_spl = FLOWMath.akima(numadIn_bld.span./maximum(numadIn_bld.span), numadIn_bld.chord,LinRange(0,1,Nslices)) - OWENSAero.setupTurb(shapeX,shapeY,B,chord_spl,tsr,Vinf;AModel,DSModel, - afname = "$path/airfoils/NACA_0021.dat", #TODO: map to the numad input - ifw, - wind_filename=windINPfilename, + T1 = round(Int,(5.8/H)*Nslices) + T2 = round(Int,(11.1/H)*Nslices) + T3 = round(Int,(29.0/H)*Nslices) + T4 = round(Int,(34.7/H)*Nslices) + airfoils = fill("$(path)/airfoils/NACA_0021.dat",Nslices) + airfoils[T1:T4] .= "$(path)/airfoils/Sandia_001850.dat" + + chord = fill(1.22,Nslices) #TODO: link chord to numad and height as opposed to span + chord[T1:T4] .= 1.07 + chord[T2:T3] .= 0.9191 + + OWENSAero.setupTurb(shapeX,shapeY,B,chord,tsr,Vinf;AModel,DSModel, + afname = airfoils, #TODO: map to the numad input + rho, + eta, + ifw, #TODO: propogate WindType + turbsim_filename = windINPfilename, ifw_libfile, - ntheta,Nslices,rho,eta,RPI) + tau = [1e-5,1e-5], + ntheta, + Nslices, + RPI) - aeroForces(t,azi) = OWENS.mapACDMS(t,azi,mymesh,myel,OWENSAero.AdvanceTurbineInterpolate;alwaysrecalc=true) - deformAero = OWENSAero.deformTurb + aeroForcesACDMS(t,azi) = OWENS.mapACDMS(t,azi,mymesh,myel,OWENSAero.AdvanceTurbineInterpolate;alwaysrecalc=true) + deformAeroACDMS = OWENSAero.deformTurb end nothing @@ -462,6 +489,7 @@ if AD15On xmesh = mymesh.x[strt_idx:end_idx] ymesh = mymesh.y[strt_idx:end_idx] ADshapeX = sqrt.(xmesh.^2 .+ ymesh.^2) + ADshapeX .-= ADshapeX[1] #get it starting at zero #TODO: make robust for blades that don't start at 0 ADshapeXspl = FLOWMath.akima(LinRange(0,H,length(ADshapeX)),ADshapeX,ADshapeY) if iADBody<=Nbld #Note that the blades can be curved and are assumed to be oriented vertically @@ -500,8 +528,8 @@ if AD15On isHAWT = false # true for HAWT, false for crossflow or VAWT ) - aeroForces(t,azi) = OWENS.mapAD15(t,azi,[mymesh],OWENSOpenFASTWrappers.advanceAD15;alwaysrecalc=true,verbosity=1) - deformAero=OWENSOpenFASTWrappers.deformAD15 + aeroForcesAD(t,azi) = OWENS.mapAD15(t,azi,[mymesh],OWENSOpenFASTWrappers.advanceAD15;alwaysrecalc=true,verbosity=1) + deformAeroAD=OWENSOpenFASTWrappers.deformAD15 end nothing @@ -562,14 +590,20 @@ nlOn = true, numNodes = mymesh.numNodes, RayleighAlpha = 0.05, RayleighBeta = 0.05, -iterationType = "DI", -predef = "update") +iterationType = "DI") println("Running Unsteady") -t, aziHist,OmegaHist,OmegaDotHist,gbHist,gbDotHist,gbDotDotHist,FReactionHist, -FTwrBsHist,genTorque,genPower,torqueDriveShaft,uHist,uHist_prp,epsilon_x_hist,epsilon_y_hist, -epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist = OWENS.Unsteady_Land(inputs;system,assembly, -topModel=feamodel,topMesh=mymesh,topEl=myel,aero=aeroForces,deformAero) +if AD15On + t, aziHist,OmegaHist,OmegaDotHist,gbHist,gbDotHist,gbDotDotHist,FReactionHist, + FTwrBsHist,genTorque,genPower,torqueDriveShaft,uHist,uHist_prp,epsilon_x_hist,epsilon_y_hist, + epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist = OWENS.Unsteady_Land(inputs;system,assembly, + topModel=feamodel,topMesh=mymesh,topEl=myel,aero=aeroForcesAD,deformAero=deformAeroAD) +else + t, aziHist,OmegaHist,OmegaDotHist,gbHist,gbDotHist,gbDotDotHist,FReactionHist, + FTwrBsHist,genTorque,genPower,torqueDriveShaft,uHist,uHist_prp,epsilon_x_hist,epsilon_y_hist, + epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist = OWENS.Unsteady_Land(inputs;system,assembly, + topModel=feamodel,topMesh=mymesh,topEl=myel,aero=aeroForcesACDMS,deformAero=deformAeroACDMS) +end if AD15On #TODO: move this into the run functions OWENSOpenFASTWrappers.endTurb() @@ -585,23 +619,15 @@ OWENS.OWENSFEA_VTK("$path/vtk/SNLARCUS5MW_timedomain_TNBnltrue",t,uHist,system,a massOwens,stress_U,SF_ult_U,SF_buck_U,stress_L,SF_ult_L,SF_buck_L,stress_TU,SF_ult_TU, SF_buck_TU,stress_TL,SF_ult_TL,SF_buck_TL,topstrainout_blade_U,topstrainout_blade_L, -topstrainout_tower_U,topstrainout_tower_L = OWENS.extractSF(bld_precompinput, +topstrainout_tower_U,topstrainout_tower_LtopDamage_blade_U, +topDamage_blade_L,topDamage_tower_U,topDamage_tower_L = OWENS.extractSF(bld_precompinput, bld_precompoutput,plyprops_bld,numadIn_bld,lam_U_bld,lam_L_bld, twr_precompinput,twr_precompoutput,plyprops_twr,numadIn_twr,lam_U_twr,lam_L_twr, mymesh,myel,myort,Nbld,epsilon_x_hist,kappa_y_hist,kappa_z_hist,epsilon_z_hist, kappa_x_hist,epsilon_y_hist;verbosity, #Verbosity 0:no printing, 1: summary, 2: summary and spanwise worst safety factor # epsilon_x_hist_1,kappa_y_hist_1,kappa_z_hist_1,epsilon_z_hist_1,kappa_x_hist_1,epsilon_y_hist_1, LE_U_idx=1,TE_U_idx=6,SparCapU_idx=3,ForePanelU_idx=2,AftPanelU_idx=5, LE_L_idx=1,TE_L_idx=6,SparCapL_idx=3,ForePanelL_idx=2,AftPanelL_idx=5, -Twr_LE_U_idx=1,Twr_LE_L_idx=1) #TODO: add in ability to have material safety factors and load safety factors - -########################################## -#### Fatigue ##### -########################################## - -##### DEL - -########################################## -#### Data Dump in OpenFAST Format ##### -########################################## +Twr_LE_U_idx=1,Twr_LE_L_idx=1, +AD15bldNdIdxRng,AD15bldElIdxRng,strut_precompoutput=nothing,strut_precompinput,plyprops_strut,numadIn_strut,lam_U_strut,lam_L_strut) #TODO: add in ability to have material safety factors and load safety factors nothing \ No newline at end of file diff --git a/docs/src/literate/sampleOWENS.yml b/docs/src/literate/sampleOWENS.yml index 7f0754fd..9e646677 100644 --- a/docs/src/literate/sampleOWENS.yml +++ b/docs/src/literate/sampleOWENS.yml @@ -17,8 +17,8 @@ operationParameters: turbulentInflow: ifw: false WindType: 3 - windINPfilename: ./data/turbsim/115mx115m_30x30_20.0msETM.bts - ifw_libfile: ./../openfast/build/modules/inflowwind/libifw_c_binding + windINPfilename: /data/turbsim/115mx115m_30x30_20.0msETM.bts + ifw_libfile: nothing controlParameters: controlStrategy: constantRPM # TODO: incorporate the others @@ -30,9 +30,9 @@ controlParameters: AeroParameters: Nslices: 30 # number of OWENSAero discritizations #TODO: AD parameters ntheta: 30 # number of OWENSAero azimuthal discretizations - AModel: AD # AD, DMS, AC - adi_lib: "./../../../../openfast/build/modules/aerodyn/libaerodyn_inflow_c_binding" - adi_rootname: "./ExampleB" + AModel: DMS # AD, DMS, AC + adi_lib: nothing + adi_rootname: "/ExampleB" structuralParameters: structuralModel: GX #GX, TNB, ROM @@ -41,9 +41,9 @@ structuralParameters: nbelem: 60 #blade elements in each ncelem: 10 #central cable elements in each if turbineType is ARCUS nselem: 5 #strut elements in each if turbineType has struts - NuMad_geom_xlscsv_file_twr: ./data/NuMAD_Geom_SNL_5MW_D_TaperedTower.csv - NuMad_mat_xlscsv_file_twr: ./data/NuMAD_Materials_SNL_5MW.csv - NuMad_geom_xlscsv_file_bld: ./data/NuMAD_Geom_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv - NuMad_mat_xlscsv_file_bld: ./data/NuMAD_Materials_SNL_5MW.csv - NuMad_geom_xlscsv_file_strut: ./data/NuMAD_Geom_SNL_5MW_Struts.csv - NuMad_mat_xlscsv_file_strut: ./data/NuMAD_Materials_SNL_5MW.csv + NuMad_geom_xlscsv_file_twr: /data/NuMAD_Geom_SNL_5MW_D_TaperedTower.csv + NuMad_mat_xlscsv_file_twr: /data/NuMAD_Materials_SNL_5MW.csv + NuMad_geom_xlscsv_file_bld: /data/NuMAD_Geom_SNL_5MW_D_Carbon_LCDT_ThickFoils_ThinSkin.csv + NuMad_mat_xlscsv_file_bld: /data/NuMAD_Materials_SNL_5MW.csv + NuMad_geom_xlscsv_file_strut: /data/NuMAD_Geom_SNL_5MW_Struts.csv + NuMad_mat_xlscsv_file_strut: /data/NuMAD_Materials_SNL_5MW.csv diff --git a/src/OWENS.jl b/src/OWENS.jl index aadc3bce..7865b3fd 100644 --- a/src/OWENS.jl +++ b/src/OWENS.jl @@ -40,7 +40,8 @@ export Modal#, Flutter # export Steady function __init__() -println("This program is running the Offshore/Onshore Wind/Water Energy Simulator (OWENS) +println("\nThis program is running OWENS.jl, the Offshore/Onshore Wind/Water Energy Simulator + Copyright 2013-2024 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, @@ -53,7 +54,7 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License.") +limitations under the License.\n") end include("Steady.jl") diff --git a/src/Unsteady.jl b/src/Unsteady.jl index 1a6bd48d..d6036c1d 100644 --- a/src/Unsteady.jl +++ b/src/Unsteady.jl @@ -1202,8 +1202,8 @@ function allocate_bottom(t,numTS,delta_t,inputs,bottomMesh,bottomEl,bottomModel, outVals = Vector{Float32}(undef, numDOFPerNode+1) # Rigid body displacement in 6DOF + wave elevation mooringTensions = Vector{Float32}(undef, numMooringLines*2) # Fairlead + anchor tension for each line - OWENSOpenFASTWrappers.HD_Init(bin.hydrodynLibPath, hd_outFilename; hd_input_file=inputs.hd_input_file, PotFile=inputs.potflowfile, t_initial=t[1], dt=delta_t, t_max=t[1]+(numTS-1)*delta_t, interp_order=inputs.interpOrder) - OWENSOpenFASTWrappers.MD_Init(bin.moordynLibPath; md_input_file=inputs.md_input_file, init_ptfm_pos=u_s_prp_n, interp_order=inputs.interpOrder, WtrDpth=200) + OWENSOpenFASTWrappers.HD_Init(;hdlib_filename=bin.hydrodynLibPath, output_root_name=hd_outFilename, hd_input_file=inputs.hd_input_file, PotFile=inputs.potflowfile, t_initial=t[1], dt=delta_t, t_max=t[1]+(numTS-1)*delta_t, interp_order=inputs.interpOrder) + OWENSOpenFASTWrappers.MD_Init(;mdlib_filename=bin.moordynLibPath, md_input_file=inputs.md_input_file, init_ptfm_pos=u_s_prp_n, interp_order=inputs.interpOrder, WtrDpth=200) return bottom_totalNumDOF,u_s_ptfm_n,udot_s_ptfm_n,uddot_s_ptfm_n,u_sm1_ptfm_n,bottomDispData,prpDOFs,u_s_prp_n,udot_s_prp_n,uddot_s_prp_n,jac,numMooringLines,FHydro_n,FMooring_n,outVals,mooringTensions end diff --git a/src/topRunDLC.jl b/src/topRunDLC.jl index 60fa3339..81c78a26 100644 --- a/src/topRunDLC.jl +++ b/src/topRunDLC.jl @@ -135,7 +135,6 @@ function MasterInput(yamlInputfile) end function runOWENS(Inp,path;verbosity=2) - # Unpack inputs analysisType = Inp.analysisType turbineType = Inp.turbineType eta = Inp.eta @@ -152,25 +151,29 @@ function runOWENS(Inp,path;verbosity=2) nbelem = Inp.nbelem ncelem = Inp.ncelem nselem = Inp.nselem - AModel = Inp.AModel ifw = Inp.ifw WindType = Inp.WindType - windINPfilename = Inp.windINPfilename + AModel = Inp.AModel + windINPfilename = "$(path)$(Inp.windINPfilename)" ifw_libfile = Inp.ifw_libfile + if ifw_libfile == "nothing" + ifw_libfile = nothing + end Blade_Height = Inp.Blade_Height Blade_Radius = Inp.Blade_Radius numTS = Inp.numTS delta_t = Inp.delta_t - NuMad_geom_xlscsv_file_twr = Inp.NuMad_geom_xlscsv_file_twr - NuMad_mat_xlscsv_file_twr = Inp.NuMad_mat_xlscsv_file_twr - NuMad_geom_xlscsv_file_bld = Inp.NuMad_geom_xlscsv_file_bld - NuMad_mat_xlscsv_file_bld = Inp.NuMad_mat_xlscsv_file_bld - NuMad_geom_xlscsv_file_strut = Inp.NuMad_geom_xlscsv_file_strut - NuMad_mat_xlscsv_file_strut = Inp.NuMad_mat_xlscsv_file_strut + NuMad_geom_xlscsv_file_twr = "$(path)$(Inp.NuMad_geom_xlscsv_file_twr)" + NuMad_mat_xlscsv_file_twr = "$(path)$(Inp.NuMad_mat_xlscsv_file_twr)" + NuMad_geom_xlscsv_file_bld = "$(path)$(Inp.NuMad_geom_xlscsv_file_bld)" + NuMad_mat_xlscsv_file_bld = "$(path)$(Inp.NuMad_mat_xlscsv_file_bld)" + NuMad_geom_xlscsv_file_strut = "$(path)$(Inp.NuMad_geom_xlscsv_file_strut)" + NuMad_mat_xlscsv_file_strut = "$(path)$(Inp.NuMad_mat_xlscsv_file_strut)" adi_lib = Inp.adi_lib - adi_rootname = Inp.adi_rootname - - println("Set up Turbine") + if adi_lib == "nothing" + adi_lib = nothing + end + adi_rootname = "$(path)$(Inp.adi_rootname)" B = Nbld R = Blade_Radius#177.2022*0.3048 #m @@ -179,52 +182,69 @@ function runOWENS(Inp,path;verbosity=2) shapeY = collect(LinRange(0,H,Nslices+1)) shapeX = R.*(1.0.-4.0.*(shapeY/H.-.5).^2)#shapeX_spline(shapeY) - mymesh,myel,myort,myjoint,sectionPropsArray,mass_twr, mass_bld, - stiff_twr, stiff_bld,bld_precompinput, - bld_precompoutput,plyprops_bld,numadIn_bld,lam_U_bld,lam_L_bld, - twr_precompinput,twr_precompoutput,plyprops_twr,numadIn_twr,lam_U_twr,lam_L_twr,aeroForces,deformAero, - mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng,AD15bldElIdxRng, - strut_precompoutput,strut_precompinput,plyprops_strut,numadIn_strut,lam_U_strut,lam_L_strut = OWENS.setupOWENS(OWENSAero,path; - rho, - Nslices, - ntheta, - RPM, - Vinf, - eta, - B, - H, - R, - shapeY, - shapeX, - ifw, - WindType, - delta_t, - numTS, - adi_lib, - adi_rootname, - windINPfilename, - ifw_libfile, - NuMad_geom_xlscsv_file_twr,# = "$path/data/NuMAD_Geom_SNL_5MW_ARCUS_Cables.csv", - NuMad_mat_xlscsv_file_twr,# = "$path/data/NuMAD_Materials_SNL_5MW_D_TaperedTower.csv", - NuMad_geom_xlscsv_file_bld,# = "$path/data/NuMAD_Geom_SNL_5MW_ARCUS.csv", - 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, - ntelem, - nbelem, - ncelem, - nselem, - joint_type = 0, - c_mount_ratio = 0.05, - AModel, #AD, DMS, AC - DSModel="BV", - RPI=true, - cables_connected_to_blade_base = true, - meshtype = turbineType) + nothing + + # Call the helper function that builds the mesh, calculates the sectional properties, + # and aligns the sectional properties to the mesh elements, + + +mymesh,myel,myort,myjoint,sectionPropsArray,mass_twr, mass_bld, +stiff_twr, stiff_bld,bld_precompinput, +bld_precompoutput,plyprops_bld,numadIn_bld,lam_U_bld,lam_L_bld, +twr_precompinput,twr_precompoutput,plyprops_twr,numadIn_twr,lam_U_twr,lam_L_twr,aeroForces,deformAero, +mass_breakout_blds,mass_breakout_twr,system,assembly,sections,AD15bldNdIdxRng, AD15bldElIdxRng = OWENS.setupOWENS(OWENSAero,path; + rho, + Nslices, + ntheta, + RPM, + Vinf, + eta, + B, + H, + R, + shapeY, + shapeX, + ifw, + WindType, + delta_t, + numTS, + adi_lib, + adi_rootname, + windINPfilename, + ifw_libfile, + NuMad_geom_xlscsv_file_twr,# = "$path/data/NuMAD_Geom_SNL_5MW_ARCUS_Cables.csv", + NuMad_mat_xlscsv_file_twr,# = "$path/data/NuMAD_Materials_SNL_5MW_D_TaperedTower.csv", + NuMad_geom_xlscsv_file_bld,# = "$path/data/NuMAD_Geom_SNL_5MW_ARCUS.csv", + 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, + ntelem, + nbelem, + ncelem, + nselem, + joint_type = 0, + c_mount_ratio = 0.05, + AModel, #AD, DMS, AC + DSModel="BV", + RPI=true, + cables_connected_to_blade_base = true, + meshtype = turbineType) + + nothing + + # Optionally, we can run the finite element solver with gemetrically exact beam theory via GXBeam.jl + # this requires that the OWENS style inputs are converted to the GXBeam inputs. This interface also + # includes the ability to output VTK files, which can be viewed in paraview. We have adapted this interface + # to work with OWENS inputs as well. + + nothing + + # If the sectional properties material files includes cost information, that is combined with the density + # to estimate the overall material cost of of materials in the blades if verbosity>0 - # Print Blades and Tower Materials Breakdown and Costs + println("\nBlades' Mass Breakout") for (i,name) in enumerate(plyprops_bld.names) println("$name $(mass_breakout_blds[i]) kg, $(plyprops_bld.costs[i]) \$/kg: \$$(mass_breakout_blds[i]*plyprops_bld.costs[i])") @@ -239,15 +259,13 @@ function runOWENS(Inp,path;verbosity=2) println("Total Material Cost Tower: \$$(sum(mass_breakout_twr.*plyprops_twr.costs))") println("Total Material Cost: \$$(sum(mass_breakout_blds.*plyprops_bld.costs)+ sum(mass_breakout_twr.*plyprops_twr.costs))") - # println("\nBlades' Material Max Strain") - # for (i,name) in enumerate(plyprops_bld.names) - # println("$name $(plyprops_bld.plies[i].xt/plyprops_bld.plies[i].e1) xt $(plyprops_bld.plies[i].xc/plyprops_bld.plies[i].e1) xc $(plyprops_bld.plies[i].yt/plyprops_bld.plies[i].e2) yt $(plyprops_bld.plies[i].yc/plyprops_bld.plies[i].e2) yc") - # end end - ###################################### - #### Perform Aerostructural One Way Test - ####################################### + nothing + + # Here we apply the boundary conditions. For this case, with a regular cantelever tower, the tower base node which is + # 1 is constrained in all 6 degrees of freedom to have a displacement of 0. You can change this displacement to allow for things + # like pretension, and you can apply boundary conditions to any node. pBC = [1 1 0 1 2 0 @@ -256,6 +274,9 @@ function runOWENS(Inp,path;verbosity=2) 1 5 0 1 6 0] + nothing + + # There are inputs for the overall coupled simulation, please see the api reference for specifics on all the options if AModel=="AD" AD15On = true @@ -273,6 +294,10 @@ function runOWENS(Inp,path;verbosity=2) AD15On, aeroLoadsOn = 2) + nothing + + # Then there are inputs for the finite element models, also, please see the api reference for specifics on the options (TODO: ensure that this is propogated to the docs) + feamodel = OWENS.FEAModel(;analysisType = structuralModel, outFilename = "none", joint = myjoint, @@ -284,15 +309,31 @@ function runOWENS(Inp,path;verbosity=2) RayleighBeta = 0.05, iterationType = "DI") + nothing + + # Here is where we actually call the unsteady simulation and where owens pulls the aero and structural solutions together + # and propogates things in time. + println("Running Unsteady") t, aziHist,OmegaHist,OmegaDotHist,gbHist,gbDotHist,gbDotDotHist,FReactionHist, FTwrBsHist,genTorque,genPower,torqueDriveShaft,uHist,uHist_prp,epsilon_x_hist,epsilon_y_hist, epsilon_z_hist,kappa_x_hist,kappa_y_hist,kappa_z_hist = OWENS.Unsteady_Land(inputs;system,assembly, topModel=feamodel,topMesh=mymesh,topEl=myel,aero=aeroForces,deformAero) - + + nothing + + # Like described above, we can output vtk files viewable in paraview. Here it is done for each time step and shows the + # deformations. Additionaly, there is a method to input custom values and have them show up on the vtk surface mesh + # for example, strain, or reaction force, etc. This is described in more detail in the api reference for the function and: TODO + println("Saving VTK time domain files") OWENS.OWENSFEA_VTK("$path/vtk/SNLARCUS5MW_timedomain_TNBnltrue",t,uHist,system,assembly,sections;scaling=1,azi=aziHist) + nothing + + # This helper function looks through all the loads and picks out the worst case safety factor in each of the stacks of composite lamina + # it also calculates analytical simply supported buckling safety factors + ########################################## #### Ultimate Failure ##### ########################################## @@ -308,17 +349,7 @@ function runOWENS(Inp,path;verbosity=2) LE_U_idx=1,TE_U_idx=6,SparCapU_idx=3,ForePanelU_idx=2,AftPanelU_idx=5, LE_L_idx=1,TE_L_idx=6,SparCapL_idx=3,ForePanelL_idx=2,AftPanelL_idx=5, Twr_LE_U_idx=1,Twr_LE_L_idx=1, - AD15bldNdIdxRng,AD15bldElIdxRng,strut_precompoutput=nothing,strut_precompinput,plyprops_strut,numadIn_strut,lam_U_strut,lam_L_strut) #TODO: add in ability to have material safety factors and load safety factors - #TODO: get struts with darrieus working in fatigue output - ########################################## - #### Fatigue ##### - ########################################## - - # DEL - - ########################################## - #### Data Dump in OpenFAST Format ##### - ########################################## + AD15bldNdIdxRng,AD15bldElIdxRng,strut_precompoutput=nothing) #TODO: add in ability to have material safety factors and load safety factors return [1.0,2.0,3.0] diff --git a/test/ExampleSNL5MW_turbulent.jl b/test/ExampleSNL5MW_turbulent.jl index b578a32d..32171a1e 100644 --- a/test/ExampleSNL5MW_turbulent.jl +++ b/test/ExampleSNL5MW_turbulent.jl @@ -64,7 +64,7 @@ println("Initialize Aerodynamics") OWENSAero.setupTurb(shapeX,shapeY,B,chord,tsr,Vinf;AModel="DMS",DSModel="BV", afname = "$(path)/airfoils/NACA_0021.dat", ifw=true, -ifw_libfile = joinpath("$(path)/../../openfast/build/modules/inflowwind/libifw_c_binding"), +ifw_libfile = nothing, wind_filename="$(path)/data/300mx300m12msETM_Coarse.bts", ntheta,Nslices,rho,eta,RPI=true) diff --git a/test/Fig4_5_campbell2.jl b/test/Fig4_5_campbell2.jl index bc1f0b05..843e087e 100644 --- a/test/Fig4_5_campbell2.jl +++ b/test/Fig4_5_campbell2.jl @@ -5,19 +5,21 @@ import FLOWMath import DelimitedFiles using Statistics:mean using Statistics +using GXBeam +using Test -import PyPlot -PyPlot.pygui(true) -PyPlot.rc("figure", figsize=(4.5, 3)) -PyPlot.rc("font", size=10.0) -PyPlot.rc("lines", linewidth=1.5) -PyPlot.rc("lines", markersize=3.0) -PyPlot.rc("legend", frameon=false) -PyPlot.rc("axes.spines", right=false, top=false) -PyPlot.rc("figure.subplot", left=.18, bottom=.17, top=0.9, right=.9) -PyPlot.rc("figure",max_open_warning=500) -# PyPlot.rc("axes", prop_cycle=["348ABD", "A60628", "009E73", "7A68A6", "D55E00", "CC79A7"]) -plot_cycle=["#348ABD", "#A60628", "#009E73", "#7A68A6", "#D55E00", "#CC79A7"] +# import PyPlot +# PyPlot.pygui(true) +# PyPlot.rc("figure", figsize=(4.5, 3)) +# PyPlot.rc("font", size=10.0) +# PyPlot.rc("lines", linewidth=1.5) +# PyPlot.rc("lines", markersize=3.0) +# PyPlot.rc("legend", frameon=false) +# PyPlot.rc("axes.spines", right=false, top=false) +# PyPlot.rc("figure.subplot", left=.18, bottom=.17, top=0.9, right=.9) +# PyPlot.rc("figure",max_open_warning=500) +# # PyPlot.rc("axes", prop_cycle=["348ABD", "A60628", "009E73", "7A68A6", "D55E00", "CC79A7"]) +# plot_cycle=["#348ABD", "#A60628", "#009E73", "#7A68A6", "#D55E00", "#CC79A7"] # function runprofilefunction() path = runpath = splitdir(@__FILE__)[1] @@ -48,20 +50,35 @@ ncelem = Inp.ncelem nselem = Inp.nselem ifw = Inp.ifw AModel = Inp.AModel -windINPfilename = Inp.windINPfilename +windINPfilename = "$(path)$(Inp.windINPfilename)" ifw_libfile = Inp.ifw_libfile +if ifw_libfile == "nothing" + ifw_libfile = nothing +end Blade_Height = Inp.Blade_Height Blade_Radius = Inp.Blade_Radius numTS = Inp.numTS delta_t = Inp.delta_t -NuMad_geom_xlscsv_file_twr = Inp.NuMad_geom_xlscsv_file_twr -NuMad_mat_xlscsv_file_twr = Inp.NuMad_mat_xlscsv_file_twr -NuMad_geom_xlscsv_file_bld = Inp.NuMad_geom_xlscsv_file_bld -NuMad_mat_xlscsv_file_bld = Inp.NuMad_mat_xlscsv_file_bld -NuMad_geom_xlscsv_file_strut = Inp.NuMad_geom_xlscsv_file_strut -NuMad_mat_xlscsv_file_strut = Inp.NuMad_mat_xlscsv_file_strut +NuMad_geom_xlscsv_file_twr = "$(path)$(Inp.NuMad_geom_xlscsv_file_twr)" +NuMad_mat_xlscsv_file_twr = "$(path)$(Inp.NuMad_mat_xlscsv_file_twr)" +NuMad_geom_xlscsv_file_bld = "$(path)$(Inp.NuMad_geom_xlscsv_file_bld)" +NuMad_mat_xlscsv_file_bld = "$(path)$(Inp.NuMad_mat_xlscsv_file_bld)" +NuMad_geom_xlscsv_file_strut = "$(path)$(Inp.NuMad_geom_xlscsv_file_strut)" +NuMad_mat_xlscsv_file_strut = "$(path)$(Inp.NuMad_mat_xlscsv_file_strut)" adi_lib = Inp.adi_lib -adi_rootname = Inp.adi_rootname +if adi_lib == "nothing" + adi_lib = nothing +end +adi_rootname = "$(path)$(Inp.adi_rootname)" + +windINPfilename +adi_rootname +NuMad_geom_xlscsv_file_twr +NuMad_mat_xlscsv_file_twr +NuMad_geom_xlscsv_file_bld +NuMad_mat_xlscsv_file_bld +NuMad_geom_xlscsv_file_strut +NuMad_mat_xlscsv_file_strut ############################################## # Setup diff --git a/test/SNL34mVAWTNormalOperation.jl b/test/SNL34mVAWTNormalOperation.jl index 73dbfe90..c950a9d1 100644 --- a/test/SNL34mVAWTNormalOperation.jl +++ b/test/SNL34mVAWTNormalOperation.jl @@ -49,20 +49,26 @@ ncelem = Inp.ncelem nselem = Inp.nselem ifw = Inp.ifw AModel = Inp.AModel -windINPfilename = Inp.windINPfilename +windINPfilename = "$(path)$(Inp.windINPfilename)" ifw_libfile = Inp.ifw_libfile +if ifw_libfile == "nothing" + ifw_libfile = nothing +end Blade_Height = Inp.Blade_Height Blade_Radius = Inp.Blade_Radius numTS = Inp.numTS delta_t = Inp.delta_t -NuMad_geom_xlscsv_file_twr = Inp.NuMad_geom_xlscsv_file_twr -NuMad_mat_xlscsv_file_twr = Inp.NuMad_mat_xlscsv_file_twr -NuMad_geom_xlscsv_file_bld = Inp.NuMad_geom_xlscsv_file_bld -NuMad_mat_xlscsv_file_bld = Inp.NuMad_mat_xlscsv_file_bld -NuMad_geom_xlscsv_file_strut = Inp.NuMad_geom_xlscsv_file_strut -NuMad_mat_xlscsv_file_strut = Inp.NuMad_mat_xlscsv_file_strut +NuMad_geom_xlscsv_file_twr = "$(path)$(Inp.NuMad_geom_xlscsv_file_twr)" +NuMad_mat_xlscsv_file_twr = "$(path)$(Inp.NuMad_mat_xlscsv_file_twr)" +NuMad_geom_xlscsv_file_bld = "$(path)$(Inp.NuMad_geom_xlscsv_file_bld)" +NuMad_mat_xlscsv_file_bld = "$(path)$(Inp.NuMad_mat_xlscsv_file_bld)" +NuMad_geom_xlscsv_file_strut = "$(path)$(Inp.NuMad_geom_xlscsv_file_strut)" +NuMad_mat_xlscsv_file_strut = "$(path)$(Inp.NuMad_mat_xlscsv_file_strut)" adi_lib = Inp.adi_lib -adi_rootname = Inp.adi_rootname +if adi_lib == "nothing" + adi_lib = nothing +end +adi_rootname = "$(path)$(Inp.adi_rootname)" ############################################## # Setup diff --git a/test/SNL34m_Inputs.yml b/test/SNL34m_Inputs.yml index 6ad86002..9ad578ed 100644 --- a/test/SNL34m_Inputs.yml +++ b/test/SNL34m_Inputs.yml @@ -17,8 +17,8 @@ operationParameters: turbulentInflow: ifw: false WindType: 3 - windINPfilename: ./test/data/turbsim/115mx115m_30x30_20.0msETM.bts - ifw_libfile: ./../openfast/build/modules/inflowwind/libifw_c_binding + windINPfilename: /data/turbsim/115mx115m_30x30_20.0msETM.bts + ifw_libfile: nothing controlParameters: controlStrategy: constantRPM # TODO: incorporate the others @@ -31,8 +31,8 @@ AeroParameters: Nslices: 35 # number of OWENSAero discritizations #TODO: AD parameters ntheta: 30 # number of OWENSAero azimuthal discretizations AModel: DMS # AD, DMS, AC - adi_lib: "/Users/kevmoor/Documents/coderepos/openfast/build/modules/aerodyn/libaerodyn_inflow_c_binding" - adi_rootname: "./SNL34m" + adi_lib: nothing + adi_rootname: "/SNL34m" structuralParameters: structuralModel: ROM #GX, TNB, ROM @@ -41,9 +41,9 @@ structuralParameters: nbelem: 60 #blade elements in each ncelem: 10 #central cable elements in each if turbineType is ARCUS nselem: 5 #strut elements in each if turbineType has struts - NuMad_geom_xlscsv_file_twr: ./test/data/NuMAD_34m_TowerGeom.csv - NuMad_mat_xlscsv_file_twr: ./test/data/NuMAD_34m_TowerMaterials.csv - NuMad_geom_xlscsv_file_bld: ./test/data/NuMAD_SNL34mGeomBlades.csv - NuMad_mat_xlscsv_file_bld: ./test/data/NuMAD_SNL34mMaterials.csv - NuMad_geom_xlscsv_file_strut: ./test/data/NuMAD_SNL34mGeomStruts.csv - NuMad_mat_xlscsv_file_strut: ./test/data/NuMAD_SNL34mMaterials.csv + NuMad_geom_xlscsv_file_twr: /data/NuMAD_34m_TowerGeom.csv + NuMad_mat_xlscsv_file_twr: /data/NuMAD_34m_TowerMaterials.csv + NuMad_geom_xlscsv_file_bld: /data/NuMAD_SNL34mGeomBlades.csv + NuMad_mat_xlscsv_file_bld: /data/NuMAD_SNL34mMaterials.csv + NuMad_geom_xlscsv_file_strut: /data/NuMAD_SNL34mGeomStruts.csv + NuMad_mat_xlscsv_file_strut: /data/NuMAD_SNL34mMaterials.csv diff --git a/test/vtk/.gitignore b/test/vtk/.gitignore new file mode 100644 index 00000000..9d1d1104 --- /dev/null +++ b/test/vtk/.gitignore @@ -0,0 +1 @@ +*.vtu \ No newline at end of file