Skip to content

Commit

Permalink
Merge branch 'devel_branch' into cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
crshapiro committed Jul 25, 2017
2 parents c98b86f + 7134302 commit 08fc124
Show file tree
Hide file tree
Showing 20 changed files with 926 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ set(USE_DYN_TN false)
# Set compiler versions for Cmake
# Intel
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
add_definitions(-DPPIFORT)
set(compiler_name "ifort")
add_definitions(-DPPIFORT)
# GNU
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
add_definitions(-DPPGFOFTRAN)
add_definitions(-DPPGFORTRAN)
set(compiler_name "gfortran")
endif ()
find_program(WHICH NAMES which)
Expand Down
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
{one line to give the program's name and a brief idea of what it does.}
Copyright (C) {year} {name of author}

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
{project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
25 changes: 25 additions & 0 deletions docs/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
source "https://rubygems.org"
ruby RUBY_VERSION

# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "3.3.0"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
gem "jekyll-theme-minimal"

# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-feed", "~> 0.6"
# end
35 changes: 35 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
LESGO solves the filtered Navier-Stokes equations in the high-Reynolds number
limit on a Cartesian mesh. Originally designed to simulate flow in the
atmospheric boundary layer, LESGO has been extended and used to simulate flow
over tree canopies, wall-mounted cubes, and wind turbine arrays, among other things.
At its core is the LES flow solver. Built on top of the solver are modules that provide
additional functionality such as immersed boundary methods, wind farm modeling, and so on.

LESGO was originally based on the code presented in John D. Albertson's PhD Thesis "Large
eddy simulation of land-atmosphere interaction" (University of California, Davis
1996). In the intervening years, many researchers have [contributed](contributors.html)
to LESGO's code base and used LESGO in dozens of scientific [publications](publications.html).

If you use LESGO for any purpose, please [cite](citing.html) appropriately.

LESGO is distributed without any warranty or technical support.

## Features
* [Flow solver](solver.html)
* [Subgrid scale models](subgrid.html)
* [Wall models](wall-model.html)
* [Level set immersed boundary method](levelset.html)
* [Wind turbine modeling](wind.html)
* [Concurrent precursor simulations](precursor.html)

## Getting started
To [get started](start.html), download the code using the buttons on the left.
You'll need a modern Fortran compiler that supports C preprocessor directives,
[CMake](https://cmake.org/), and [FFTW3](http://www.fftw.org/).

## Licensing
LESGO is a free, open-source tool published under the
[GNU General Public License Version 3](http://www.gnu.org/licenses/)

## Acknowledgements
Development of LESGO has been supported in part by the National Science Foundation.
16 changes: 16 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Site settings
title: LESGO
email: [email protected]
description: # this means to ignore newlines until "baseurl:"
LESGO is a parallel pseudo-spectral large-eddy simulation code.
show_downloads: "true"

# Build settings
theme: jekyll-theme-minimal
markdown: kramdown
repository: lesgo_jhu/lesgo-pages
exclude:
- Gemfile
- Gemfile.lock


68 changes: 68 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>{{ site.title | default: site.github.repository_name }} by {{ site.github.owner_name }}</title>

<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<meta name="viewport" content="width=device-width">

<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>{{ site.title | default: site.github.repository_name }}</h1>
<img src="img/abl.png" alt="ABL" style="width:304px;">
<p>{{ site.description | default: site.github.project_tagline }}</p>

{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p>
{% endif %}

{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}

{% if site.show_downloads %}
<ul>
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
</ul>
{% endif %}
</header>
<section>

{{ content }}

</section>
<footer>
<!-- {% if site.github.is_project_page %} -->
<!-- <p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p> -->
<!-- {% endif %} -->
<img src="img/by-sa.png" alt="by-sa" style="width:100px;">
<p><small>Content on this site is licensed under a <a href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported license</a>. Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="{{ '/assets/js/scale.fix.js' | relative_url }}"></script>


{% if site.google_analytics %}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>
62 changes: 62 additions & 0 deletions docs/actuator-disk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Actuator disk model
Each turbine is represented as a drag disk with a force that depends on the
velocity at the disk (averaged in time and space). This force is distributed
across several grid points that together represent the turbine. For large arrays
the coarse grid resolution does not allow for the modeling of individual
blades. LESGO's implementation does not include rotation of the drag disk, and
tangential forces are not applied to the flow.

The turbine force is given by
\\[F = -\frac{1}{2} \rho C_T' \left \langle u_d \right \rangle^2 A\\]
where \\(\rho\\) is the fluid density, \\(C_T'\\) is the local thrust
coefficient, \\(\left \langle u_d \right \rangle\\) is the disk and time-averaged
velocity, and \\(A\\) is the rotor swept area.

The force is distributed across grid points using an indicator function which
is determined during code initialization. To avoid Gibbs phenomenon with sharp
gradients, this indicator function (currently 1 inside and 0 outside a turbine)
is smoothed with a Gaussian filter. Each grid point with a non-zero indicator
function applies a force on the flow.

## Settings
The first settings specify the wind-turbine array geometry and orientation.
The user can set the number of turbines in each direction as well
as their size. Several common orientations (aligned, staggered, etc) are
available. The user is also able to specify the thrust coefficients \\(C_T'\\).

In addition to easy to use options for regularly arranged wind farms, the user
may also specify the details for each wind turbine in the farm by writing a
custom "input_turbines/param.dat" file. This allows for any wind farm
configuration and allows each turbine to have its own rotor diameter,
orientation, and thrust coefficient. The thrust coefficients and orientation of
each turbine may also be changed in time by writing custom input files in the
folder "input_turbines".

Technical settings relating to the filtering of the indicator function, time
averaging, and output writing are also available in "lesgo.conf". More details
are also provided as comment in the input file.

## Output
All output files relating to the turbines can be found in the "turbine" folder.
The following quantities are also written to file for each turbine in the files
"turbine_#.dat".
* current time (dimensional)
* disk center u velocity (dimensionless)
* disk center v velocity (dimensionless)
* disk center w velocity (dimensionless)
* instantaneous disk-averaged velocity (dimensionless)
* current time and disk-averaged velocity (dimensionless)
* counter clockwise angle, when viewed from above, from the -*x* direction \\(\theta_1\\) (degrees)
* angle above the horizontal \\(\theta_2\\) (degrees)
* local thrust coefficient \\(C_T'\\)

The values of the time and disk-averaged velocity for each turbine as
well as the filtering time scale are written to file "u_d_T.dat". The horizontally
averaged streamwise velocity at the top of the domain is written to "vel_top.dat"

## References
Calaf M, Meneveau C, and Meyers J. "[Large eddy simulation study of fully developed
wind-turbine array boundary layers](http://dx.doi.org/10.1063/1.3291077)."
*Physics of Fluids* **22** (2010). 015110.

Meyers J, Meneveau C. "[Large eddy simulations of large wind-turbine arrays in the atmospheric boundary layer](http://dx.doi.org/10.2514/6.2010-827)." *50th AIAA Aerospace Sciences Meeting*, (2010). Orlando, FL. AIAA Paper No. 2010-827.
68 changes: 68 additions & 0 deletions docs/actuator-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Actuator line/sector model

The actuator line model (ALM) is implemented by applying body forces to
the flow field. These forces are calculated by sampling the velocity field along
the blades. At each blade point, the lift and drag forces are read from
precomputed tables and applied to the flow field using a Gaussian filter kernel
at a scale \\(\epsilon \\).

## Settings
The ALM in LESGO is implemented in a similar form as the [SOWFA](https://nwtc.nrel.gov/SOWFA) package from NREL, including the input
files. Input files for the NREL 5MW reference turbine are located in "inputATM."
The turbine array is specified in "inputATM/turbineArrayProperties." For example:


! Global Properties
numberOfTurbines 1
outputInterval 1
updateInterval 1

! First turbine
TURBINE_1 {
turbineType "NREL5MWRef"
baseLocation 190.0, 315.0, 225.0
numBladePoints 60
epsilon 12.5
sampling "atPoint"
rotationDir "cw"
Azimuth 232.0105
RotSpeed 9.155
Pitch 0
NacYaw 0
fluidDensity 1.23
numAnnulusSections 1
annulusSectionAngle 0.
nacelleFlag false
nacelleCd 1.
TSR 6.
tipALMCorrection .true.
optimalEpsilon 0.25
}

Each turbine type is defined in a file that specifies basic details about the
gemoetry of the turbine, the turbine controller, and definitions of the blades.
The lift and drag lookup tables are located in the folder "inputATM/AeroData."

## Output
All output files relating to the turbines can be found in the "turbineOutput"
folder. The following The following quantities are written for each turbine in the files
"turbineOutput/TURBINE_#/...".
* Drag coefficient
* Drag force
* Lift coefficient
* Lift force
* Thrust force
* Tangential force
* Axial force
* Axial velocity
* Relative velocity
* Tangential velocity
* Yaw angle
* Pitch angle
* Rotational speed
* Power

# References
Martínez-Tossas LA, Churchfield M, Meneveau C. "[Large Eddy Simulation of wind turbine wakes: detailed comparisons of two codes focusing on effects of numerics and subgrid modeling](https://doi.org/10.1088/1742-6596/625/1/012024)." *Journal of Physics: Conference Series* **625** (2015). 012024.

Martínez-Tossas LA, Stevens RJAM, Meneveau C. "[Wind farm large-eddy simulations on very coarse grid resolutions using an actuator line model](https://doi.org/10.2514/6.2016-1261)." *34th Wind Energy Symposium* (2016). San Diego, California. AIAA Paper No. 2016-1261.
47 changes: 47 additions & 0 deletions docs/citing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Citing LESGO

If you use LESGO, please cite the code appropriately. In addition to a citation
to this website:

*LESGO: A parallel pseudo-spectral large-eddy simulation code.*
[https://lesgo-jhu.github.io/lesgo](https://lesgo-jhu.github.io/lesgo) (2017)

include references to the relevant research articles. The articles that should
be cited depend on the features used. See the list below to select the appropriate
references for your use.

## Subgrid scale models
Bou-Zeid E, Meneveau C, Parlange MB. "[A scale-dependent Lagrangian dynamic model
for large eddy simulation of complex turbulent flows](http://dx.doi.org/10.1063/1.1839152)."
*Physics of Fluids* **17** (2005). 025105.

Porté-Agel F, Meneveau C, Parlange MB. “[A scale-dependent dynamic model for large eddy simulation: applications to a neutral atmospheric boundary layer](https://doi.org/10.1017/S0022112000008776).” *Journal of Fluid Mechanics* **415** (2000). 261-284.

Smagorinsky J. "[General circulation experiments with the primitive equations: I. The basic experiment](http://journals.ametsoc.org/doi/abs/10.1175/1520-0493%281963%29091%3C0099%3AGCEWTP%3E2.3.CO%3B2)."
*Monthly Weather Review* **91** (1963). 99-164.

## Wall models
Yang X, Sadique J, Mittal R, Meneveau C. "[Integral wall model for large eddy
simulations of wall-bounded turbulent flows](http://dx.doi.org/10.1063/1.4908072)".
*Physics of Fluids* **27** (2015). 025112.

Moeng CH. "[A Large-Eddy-Simulation Model for the Study of Planetary Boundary-Layer Turbulence](https://doi.org/10.1175/1520-0469(1984)041<2052:ALESMF>2.0.CO;2)." *Journal of the Atmospheric Sciences* **41** (1984). 2052–2062.

## Concurrent precursor method
Stevens RJAM, Graham J, Meneveau C. "[A concurrent precursor inflow method for
Large Eddy Simulations and applications to finite length wind farms](https:/doi.org/10.1016/j.renene.2014.01.024)."
*Renewable Energy* **68** (2014). 46-50.

## Wind turbines: actuator disk model
Calaf M, Meneveau C, and Meyers J. "[Large eddy simulation study of fully developed
wind-turbine array boundary layers.](http://dx.doi.org/10.1063/1.3291077)"
*Physics of Fluids* **22** (2010). 015110.

Meyers J, Meneveau C. "[Large eddy simulations of large wind-turbine arrays in
the atmospheric boundary layer.](http://dx.doi.org/10.2514/6.2010-827 )" *50th
AIAA Aerospace Sciences Meeting*, Orlando, FL, 2010. AIAA Paper No. 2010-827.

## Wind turbines: actuator line model
Martínez-Tossas LA, Churchfield M, Meneveau C. "[Large Eddy Simulation of wind turbine wakes: detailed comparisons of two codes focusing on effects of numerics and subgrid modeling](https://doi.org/10.1088/1742-6596/625/1/012024)." *Journal of Physics: Conference Series* **625** (2015). 012024.

Martínez-Tossas LA, Stevens RJAM, Meneveau C. "[Wind farm large-eddy simulations on very coarse grid resolutions using an actuator line model](https://doi.org/10.2514/6.2016-1261)." *34th Wind Energy Symposium* (2016). San Diego, California. AIAA Paper No. 2016-1261.
20 changes: 20 additions & 0 deletions docs/contributors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributors
LESGO is the product of work by many research over many years.

* William Anderson
* Elie Bou-Zeid
* Joel Bretheim
* Stuart Chester
* Jason Graham
* Perry Johnson
* Tony Martinez
* Fernando Porté-Agel
* Carl Shapiro
* Richard Stevens
* Yuheng Tseng
* Claire VerHulst
* Xiang Yang

As an open source code, everyone is free to modify and add to the current LESGO
code. If you would like to contribute to the main repository, please contact us
with information about the contribution.
Binary file added docs/img/abl.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/img/by-sa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 08fc124

Please sign in to comment.