Skip to content

Commit

Permalink
Removing old docs and addressing build warnings. (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikurj authored Apr 17, 2020
1 parent 959a1d3 commit 85ca7a9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 73 deletions.
3 changes: 1 addition & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ multi-block and overset 3D CFD solver.
introduction
install
tutorial
meshing
options
pyADflow
solvers
performance
devguide

See Fortran code documentation `here <_static/doxydoc/html/index.html>`_
47 changes: 0 additions & 47 deletions doc/meshing.rst

This file was deleted.

58 changes: 34 additions & 24 deletions doc/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,30 @@
Tutorial
========

Meshing
-------

Before running ADflow we need a CGNS mesh. For a complete tutorial on using MACH, including meshing, please refer to the `MACH aero tutorial <https://github.com/mdolab/MACH_Aero_Tutorials>`_.


Basic Run Script
----------------

The following shows how to get started with ADflow by running the mdo_tutorial
wing problem. First, we show the complete program listing and then go through
wing problem. First, we show the complete program listing and then go through
each statement line by line::

# This is a template that should be used for setting up
# RANS analysis scripts

# ======================================================================
# Import modules
# ======================================================================
import numpy
from mpi4py import MPI
from baseclasses import *
from adflow import ADFLOW

# ======================================================================
# Input Information -- Modify accordingly!
# ======================================================================
Expand All @@ -33,25 +39,25 @@ each statement line by line::
MGCycle = '3w'
altitude = 10000
name = 'fc'

aeroOptions = {
# Common Parameters
'gridFile':gridFile,
'outputDirectory':outputDirectory,

# Physics Parameters
'equationType':'RANS',

# Common Parameters
'CFL':1.5,
'CFLCoarse':1.25,
'MGCycle':MGCycle,
'MGCycle':MGCycle,
'MGStartLevel':-1,
'nCyclesCoarse':250,
'nCycles':1000,
'monitorvariables':['resrho','cl','cd'],
'useNKSolver':False,

# Convergence Parameters
'L2Convergence':1e-6,
'L2ConvergenceCoarse':1e-2,
Expand All @@ -73,7 +79,7 @@ each statement line by line::
# Print the evaluatd functions
if MPI.COMM_WORLD.rank == 0:
print funcs


Start by importing the ``adflow``, ``baseclasses``, and ``mpi4py``.::

Expand Down Expand Up @@ -101,31 +107,31 @@ a few flow conditions and reference values to be put into ``AeroProblem`` later.
MGCycle = '3w'
altitude = 10000
name = 'fc'

aeroOptions = {
# Common Parameters
'gridFile':gridFile,
'outputDirectory':outputDirectory,

# Physics Parameters
'equationType':'RANS',

# Common Parameters
'CFL':1.5,
'CFLCoarse':1.25,
'MGCycle':MGCycle,
'MGCycle':MGCycle,
'MGStartLevel':-1,
'nCyclesCoarse':250,
'nCycles':1000,
'monitorvariables':['resrho','cl','cd'],
'useNKSolver':False,

# Convergence Parameters
'L2Convergence':1e-6,
'L2ConvergenceCoarse':1e-2,
}

Now, this is the actually solution part. We start by defining the ``AeroProblem``,
Now, this is the actually solution part. We start by defining the ``AeroProblem``,
which is import from ``baseclasses``. We specify flow condtions and reference values
into the ``aeroProblem``. We also tell the solver which solution values that
we are interested in. In this case, we use the keyword ``evalFuncs``. ::
Expand All @@ -135,25 +141,25 @@ we are interested in. In this case, we use the keyword ``evalFuncs``. ::
areaRef=areaRef, chordRef=chordRef,
evalFuncs=['cl','cd'])

Then, we create the ADflow instant. We also provide ADflow all the options that we
Then, we create the ADflow instant. We also provide ADflow all the options that we
just specified above. ::

# Create solver
CFDSolver = ADFLOW(options=aeroOptions)

Now, we solve the CFD problem. ``CFDSolver(ap)`` is the command that actually
solve the CFD. You can see print out from ADflow of each iteration here. This
solve the CFD. You can see print out from ADflow of each iteration here. This
example will take just a couple minutes. ``CFDSolver.evalFunctions()`` return
the function of interests we specified in ``AeroProblem``.::

# Solve and evaluate functions
funcs = {}
CFDSolver(ap)
CFDSolver.evalFunctions(ap, funcs)
Finally, we print out the value of `cd` and `cl`. We only print on the

Finally, we print out the value of `cd` and `cl`. We only print on the
root processor. ::

# Print the evaluatd functions
if MPI.COMM_WORLD.rank == 0:
print funcs
Expand Down Expand Up @@ -181,12 +187,16 @@ Usually there is only one mode set at a time. When doing a rigid rotation beawar

There are two common cases. The span of the wing is in, y direction (rotation about y-axis) or z direction (rotation about y-axis):

NEED TO REFINE
NEED TO REFINE
THIS DEPENDS ON THE COORDINATES
1. Span is in y direction / rotation is about the y-axis. (rmode needs to be set to true)
* positive rotation (+deltaAlpha) will pitch the wing upwards

* positive rotation (+deltaAlpha) will pitch the wing upwards
* negative rotation (-deltaAlpha) will pitch the wing downwards

2. Span is in z direction / rotation is about the z-axis (qmode needs to be set to true)
* negative rotation (-deltaAlpha) will pitch the wing upwards

* negative rotation (-deltaAlpha) will pitch the wing upwards
* positive rotation (+deltaAlpha) will pitch the wing downwards


0 comments on commit 85ca7a9

Please sign in to comment.