Skip to content

Commit

Permalink
Adapt documentation and tests for github environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoor committed Apr 9, 2024
1 parent 917a3f5 commit 9328f8f
Show file tree
Hide file tree
Showing 18 changed files with 394 additions and 212 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -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"),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")])'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -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()'
28 changes: 28 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -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 }}
22 changes: 7 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 4 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/literate/A_simplyRunningOWENS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
53 changes: 25 additions & 28 deletions docs/src/literate/B_detailedInputs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import OWENS
import OWENSAero
# import PyPlot

path = runpath = "./" #splitdir(@__FILE__)[1]
path = runpath = splitdir(@__FILE__)[1]

Inp = OWENS.MasterInput("./sampleOWENS.yml")
Inp = OWENS.MasterInput("$runpath/sampleOWENS.yml")

nothing

Expand All @@ -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
Expand All @@ -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,
Expand All @@ -90,6 +97,7 @@ mass_breakout_blds,mass_breakout_twr,system,assembly,sections = OWENS.setupOWENS
shapeY,
shapeX,
ifw,
WindType,
delta_t,
numTS,
adi_lib,
Expand Down Expand Up @@ -191,8 +199,7 @@ nlOn = true,
numNodes = mymesh.numNodes,
RayleighAlpha = 0.05,
RayleighBeta = 0.05,
iterationType = "DI",
predef = "update")
iterationType = "DI")

nothing

Expand Down Expand Up @@ -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
Loading

0 comments on commit 9328f8f

Please sign in to comment.