Adaptation Tutorials
Adaptation Tutorial #1
Testing Solution Gradient-Based Adaptation
Intent: Ensure that adapt_mpi is running properly (with faux_geom)
This tutorial will describe how to set up 2 test cases for adapt_mpi.
The files for running this case are available upon request
(from FUN3D Support), and with
versions of fun3d after 10.4.1.
The user should be familiar with running the baseline flow solver, and
have compiled the adapt_mpi code, linked to faux_geom,
as described in the Adaptation Section
The first case (no_flow) will exercise the adapt_mpi code without requiring a flow solution.
This case will just show that the adaptation code is compiled and running correctly.
The second case will run the solver for a few iterations, adapt to that
flow solution, and then run the solver for more iterations.
Again, this case demonstrates the process for running adapt_mpi, but does
not itself produce complete, converged results.
Files
Download and gunzip/untar the files:
adapt_feature/ check_flow.lay fun3d_long.nml fun3d_initial/nml party_inp_init geometry/om6p01.fastbc geometry/om6p01.faux_input geometry/om6p01.fgrid no_flow_results/om6p02_adapt_stats.txt
The om6p01 mesh has 5231 nodes and 28523 tets.
Setup
Create working directories, and copy geometry files, executables, and input files as needed.cd examples/adapt_examples mkdir no_flow cd no_flow cp ../geometry/* . ln -sf om6p01.faux_input faux_input cp ../fun3d_initial.nml fun3d.nml cp ../party_inp_init . ln -sf <your-path_to_executables>/party . ln -sf <your-path_to_executables>/adapt(_mpi) . cd .. mkdir flow cd flow <repeat above setup steps> cd ..
Case 1, no_flow
cd no_flow ./party --no_renum < party_inp_init > party_out_init
Note that we are only creating 1 part file.
This example can be run with or without mpi as it is.
To test with more partitions, change the input to party to produce more partitions.
./adapt --skip_qsave --adapt_cycles 1 \
--adapt_coarsen 1.0 --adapt_feature_type 0 \
--adapt_maxedge 1.0 --adapt_maxratio 10 \
--output_error 0.0001 --adapt_freezebl 0.02 \
--adapt_smooth_surface --adapt_feature_debug \
--adapt_project om6p02
To run with mpi, use mpirun <options> adapt_mpi with the appropriate options for your system.
After the adaptation is complete, there should be many additional output files. The primary files to look at are
om6p02_adapt_stats.txt om6p02_part.1
The first file is a text file that will contain the number of nodes and cells in
the new mesh, and the adaptation parameters used.
It should match the file of the same name in the no_flow_results directory.
diff om6p02_adapt_stats.txt ../no_flow_resultsThere might be a difference of a couple of nodes or cells, due to compiler differences. The new mesh size should be in the neighborhood of:
nodes: 8658 cells: 47948
The part file should exist after the adaptation. Because no flow files are written out for this case (because a manufactured solution was used for adaptation), party cannot be used to generate a plot file to view the adapted mesh.
Case 2, flow
Repeat the setup steps for a directory namedflow.
Additionally, link the flow solver:
ln -sf <your-path_to_executables>/nodet(_mpi) .The preprocessing step is the same as Case 1.
./party < party_inp_init > party_out_init
Next, run the flow solver for a few steps.
The convergence tolerance for the case is set to 1e-04, so
the solver should stop quickly, after about 4 iterations.
Again, use the appropriate mpirun options for a multiprocessor case.
./nodet --skip_qsave
The adaptation is run using the same options as Case 1, except without
--adapt_feature_debug.
./adapt --skip_qsave --adapt_cycles 1 \
--adapt_coarsen 1.0 --adapt_feature_type 0 \
--adapt_maxedge 1.0 --adapt_maxratio 10 \
--output_error 0.0001 --adapt_freezebl 0.02 \
--adapt_smooth_surface \
--adapt_project om6p02
After the new mesh (om6p02) is generated, the flow solver should be run again.
Note that the only differences in the input file are that irest==1 and
the project name is changed to om6p02
cp ../fun3d_restart.nml fun3d.nml ./nodet --skip_qsave
For this case, the primary files to look at are:
om6p02_adapt_stats.txt om6p02_flow.1 om6p02_part.1The new mesh size should be in the neighborhood of:
nodes: 8353 cells: 46031
The results of the adaptation can be further checked by generating plot files
for tecplot, and using the layout file, check_flow.lay.
The data files, om6p01_soln.tec and om6p02_soln.tec, should be generated with
party by selecting option 20 to postprocess the files, and then choosing the
first tecplot option.
The tecplot view (below) will show the symmetry plane and OM6 wing, with the
adapted mesh (red) overlaid on the initial mesh (blue).
The two meshes should be clearly different on the symmetry plane.
Because the mesh was not adapted on the surface of the wing,
the meshes should exactly overlay on the surface.
The effect of freezing the boundary layer with the --adapt_freezebl 0.02
option is not clear for this example, because the mesh does not have a
boundary layer, and the first points off of the body are further than the
0.02 distance specified.

NASA Official:
Bill Jones, a member of
The FUN3D Development Team
Contact: FUN3D-support@lists.nasa.gov
NASA Privacy Statement