### Compile and install COOLFluiD with make Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Compiles COOLFluiD libraries, typically on multiple cores (4 in this example), and installs them. Using make install is not necessary if soft links to the coolfluid-solver executable in basebuild_dir/src/Solver are used instead. ```latex cd basebuild_dir ; make -j4 ; make install ``` -------------------------------- ### Build and install Mutation++ Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-use-Mutationpp Builds and installs Mutation++ from source. Run this inside YOUR_DIR after unpacking the release. By default, installation goes to YOUR_DIR/mutation++/install. ```bash cd mutation++ ; mkdir build ; cd build ; cmake .. ; make -j8 ; make install ``` -------------------------------- ### Run the installation script Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-VSC-(for-KU-Leuven-users) Execute the script to download, configure, compile, and install COOLFluiD. ```bash ./install_COOLFluiD.sh --download=2 ``` -------------------------------- ### Download the installation script Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-VSC-(for-KU-Leuven-users) Download the VSC-specific installation script using wget. ```bash wget https://raw.githubusercontent.com/andrealani/COOLFluiD/master/tools/conf/VSC/install_COOLFluiD.sh ``` -------------------------------- ### Install and use Qorona CLI Source: https://github.com/andrealani/coolfluid/blob/master/plugins/MHD/testcases/COCONUT/Qorona.md Install Qorona via pip, then use the CLI to inspect a COCONUT restart file, build the viewpoint-independent Q-perp volume, and render viewpoints to an image. The build step takes minutes, while each render takes seconds. ```bash pip install qorona # inspect the solution (mesh, variables, boundaries) qorona info corona_restart.CFmesh # build the viewpoint-independent Q-perp volume once (minutes) qorona build corona_restart.CFmesh -o corona.qor # render any number of viewpoints off it (seconds each) qorona render corona.qor -o eclipse.png --fov 8 ``` -------------------------------- ### Copy example configuration file Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Creates a local configuration file from the provided VKI example. Rename or edit the resulting coolfluid.conf to set paths for COOLFluiD folders, dependencies, and compilers. ```bash cp tools/conf/coolfluid.conf.vki.example coolfluid.conf ``` -------------------------------- ### Install COOLFluiD Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Installs COOLFluiD to the directory specified by install_dir in coolfluid.conf. Plugin API headers are installed only if install_api lists the libraries. ```bash make install ``` -------------------------------- ### Install COOLFluiD with build configurations Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-Genius-(for-KU-Leuven-users) Runs the installation script with different build configurations. Use DEBUG_CUDA for debugging with CUDA, OPTIM_CUDA for production with CUDA, DEBUG_NOCUDA for debugging without CUDA, and OPTIM_NOCUDA for production without CUDA. The --download=2 flag downloads, configures, compiles, and installs COOLFluiD. ```bash ./install_COOLFluiD.sh DEBUG_CUDA --download=2 ``` ```bash ./install_COOLFluiD.sh OPTIM_CUDA --download=2 ``` ```bash ./install_COOLFluiD.sh DEBUG_NOCUDA --download=2 ``` ```bash ./install_COOLFluiD.sh OPTIM_NOCUDA --download=2 ``` -------------------------------- ### Make the installation script executable Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-VSC-(for-KU-Leuven-users) Change the file permissions to make the script runnable. ```bash chmod u+x install_COOLFluiD.sh ``` -------------------------------- ### Add subdirectories and install headers Source: https://github.com/andrealani/coolfluid/blob/master/CMakeLists.txt Adds the apps and config subdirectories and installs generated header files. The apps subdirectory is added first, then config is added after all detection so the configuration file is generated last. The INSTALL command places the config and SVN header files into the include directory. ```cmake ADD_SUBDIRECTORY ( apps ) ``` ```cmake ADD_SUBDIRECTORY ( config ) ``` ```cmake INSTALL(FILES ${COOLFluiD_BINARY_DIR}/${CF_CONFIG_HH_FILENAME} ${COOLFluiD_BINARY_DIR}/${CF_SVN_HH_FILENAME} DESTINATION ${CF_INSTALL_INCLUDE_DIR}) ``` -------------------------------- ### Example commands for various options Source: https://github.com/andrealani/coolfluid/blob/master/tools/MeshGeneration/README.md Example invocations covering different sphere methods, distribution methods, and output formats. The geometric distribution uses -k 1.2, the fibonacci method uses -p 500, equidistant uses -d equidistant, bump uses -d bump -b 0.2, manual uses -d manual -m with layer heights, and -f both outputs both CFmesh and MSH formats. ```bash python generate_spherical_shell_Q2.py -r 21.5 -R 235 -l 3 -n 20 -k 1.2 ``` ```bash python generate_spherical_shell_Q2.py -r 21.5 -R 235 -s fibonacci -p 500 -n 20 ``` ```bash python generate_spherical_shell_Q2.py -r 21.5 -R 235 -l 3 -n 30 -d equidistant ``` ```bash python generate_spherical_shell_Q2.py -r 21.5 -R 235 -l 3 -n 20 -d bump -b 0.2 ``` ```bash python generate_spherical_shell_Q2.py -r 1.0 -R 2.0 -l 2 -d manual -m 0.3 0.4 0.3 ``` ```bash python generate_spherical_shell_Q2.py -r 21.5 -R 235 -l 3 -n 20 -k 1.2 -f both ``` -------------------------------- ### Run installation in background with nohup Source: https://github.com/andrealani/coolfluid/blob/master/plugins/MHD/testcases/COCONUT/coconut_instructions.md Use this command to run the installation in the background, allowing you to log out without interrupting the process. Monitor progress via the generated nohup.out file. ```bash nohup /install_COOLFluiD.sh DEBUG_NOCUDA --download=2 & ``` -------------------------------- ### Install all .cmake files to cmake destination Source: https://github.com/andrealani/coolfluid/blob/master/cmake/CMakeLists.txt Uses FILE(GLOB ...) to collect all .cmake files in the current source directory and INSTALL(FILES ...) to install them to the cmake destination. ```cmake FILE(GLOB cmakeFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.cmake") INSTALL( FILES ${cmakeFiles} DESTINATION cmake ) ``` -------------------------------- ### COOLFluiD installation commands (svn, prepare.pl, make, export) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Commands for installing COOLFluiD dependencies, checking out the kernel, configuring the build, compiling, and setting environment variables. The first two commands are only needed if dependency libraries are not already installed; internal VKI users can skip them. The build mode 'optim' is recommended over 'debug' or 'release'. ```bash svn co https://coolfluidsrv.vki.ac.be/svn/coolfluid/Scripts/install-coolfluid-deps.pl ``` ```bash ./install-coolfluid-deps.pl --tmp-dir=TDIR --install-dir=LDIR --install-mpi-dir=MDIR ``` ```bash export PATH=LDIR/bin:MDIR/bin:$PATH export LD_LIBRARY_PATH=LDIR/lib:MDIR/lib:MDIR/petsc/lib:$LD_LIBRARY_PATH ``` ```bash svn co https://coolfluidsrv.vki.ac.be/svn/coolfluid/Sources/Kernel/trunk coolfluid ``` ```bash ./prepare.pl --config-file=coolfluid.conf --mods-update ``` ```bash ./prepare.pl --config-file=coolfluid.conf --build=optim ``` ```bash cd basebuild_dir ; make -j4 ; make install ``` ```bash export PATH=install_dir/bin:$PATH export LD_LIBRARY_PATH=install_dir/lib:$LD_LIBRARY_PATH ``` -------------------------------- ### Install COOLFluiD dependencies with install-coolfluid-deps.pl Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Runs the dependency installation script. TDIR is the full path where dependency files are unpacked, LDIR is the installation directory, and MDIR is where MPI libraries are installed. PETSc and ParMetis are installed inside the MPI directory. This step is only needed if dependency libraries are not already installed. ```latex cd coolfluid/tools/scripts ./install-coolfluid-deps.pl --tmp-dir=TDIR --install-dir=LDIR --install-mpi-dir=MDIR ``` -------------------------------- ### Mesh loading and setup (CFmeshFileReader) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_RDS_UnsteadyNavierStokes.tex Loads and sets up the mesh using the CFmeshFileReader with the specified file name and boundary regions. ```text Simulator.SubSystem.Default.listTRS = InnerTRS wall in out symm_0 symm_1 Simulator.SubSystem.MeshCreator = CFmeshFileReader Simulator.SubSystem.CFmeshFileReader.Data.FileName = kvs2.CFmesh ``` -------------------------------- ### Set Mutation2OLD path to Mutation 2.0 installation Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Provides the full path to the Mutation 2.0 installation. No environmental variables are allowed here. ```text Simulator.SubSystem.NavierStokes2DNEQ.Mutation2OLD.path = \ /data1/andrea/COOLFLUID/plugins/Mutation2.0.0I/ ``` -------------------------------- ### Set install_api in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Declares a comma-separated list of libraries whose API (header files) will be installed. No spaces are allowed in the list. ```text install_api = NavierStokes,FiniteVolume,FiniteVolumeNavierStokes,Tecplot ``` -------------------------------- ### Install PETSc with CUDA bindings via install-coolfluid-deps.pl Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-enable-CUDA Run from $YOUR_COOLFluiD/tools/scripts to install an optimized PETSc 3.9.3 with CUDA bindings. Requires the petsc-3.9.3.tar.gz archive in $YOUR_COOLFluiD/packages and the environment variables PETSC_INSTALLDIR, MPI_INSTALLDIR, TMP_DIR, and CUDA_DIR set. ```bash ./install-coolfluid-deps.pl --install=petsc --install-petsc-dir=$PETSC_INSTALLDIR --install-mpi-dir=$MPI_INSTALLDIR --tmp-dir=$TMP_DIR --cuda-dir=$CUDA_DIR --install-dir=$PETSC_INSTALLDIR --debug=0 CXXOPTFLAGS="-fPIC -O3" COPTFLAGS="-fPIC -O3" FOPTFLAGS="-fPIC -O3" ``` -------------------------------- ### Set PATH and LD_LIBRARY_PATH for COOLFluiD installation Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Sets the appropriate paths to the COOLFluiD libraries in .bashrc after installation. ```latex export PATH=install_dir/bin:$PATH export LD_LIBRARY_PATH=install_dir/lib:$LD_LIBRARY_PATH ``` -------------------------------- ### Polynomial Reconstruction Setup Options Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ICP.tex Required options for polynomial reconstruction using LeastSquareP1Setup and LinearLS2D. Includes flux limiter settings (Venktn2D) needed for second order simulations; can be commented out for first order. ```text Simulator.SubSystem.CellCenterFVM.SetupCom = LeastSquareP1Setup Simulator.SubSystem.CellCenterFVM.SetupNames = Setup1 Simulator.SubSystem.CellCenterFVM.Setup1.stencil = FaceVertexPlusGhost Simulator.SubSystem.CellCenterFVM.UnSetupCom = LeastSquareP1UnSetup Simulator.SubSystem.CellCenterFVM.UnSetupNames = UnSetup1 Simulator.SubSystem.CellCenterFVM.Data.PolyRec = LinearLS2D # the following settings of the flux limiter can be commented out in first order # simulations, but are needed in second order Simulator.SubSystem.CellCenterFVM.Data.Limiter = Venktn2D Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.coeffEps = 1.0 Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.useFullStencil = true # set true the following for backward compatibility, but false should behave better Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.useNodalExtrapolationStencil = false Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.length = 1.0 ``` -------------------------------- ### Download install_COOLFluiD.sh Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-Genius-(for-KU-Leuven-users) Downloads the installation script for COOLFluiD on the Genius cluster. Run this before editing or executing the script. ```bash wget https://raw.githubusercontent.com/andrealani/COOLFluiD/master/tools/conf/Genius/install_COOLFluiD.sh ``` -------------------------------- ### COOLFluiD installation instructions URL Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex URL for the COOLFluiD installation instructions. Users must contact the project administrator to obtain access to the source code. ```latex http://coolfluidsrv.vki.ac.be/trac/coolfluid ``` -------------------------------- ### Update configuration: export library path Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Updates the library path to include the Mutation++ install lib directory. ```bash export LD_LIBRARY_PATH=/Users/lani/mutation++/install/lib:$LD_LIBRARY_PATH ``` -------------------------------- ### Default dependency paths in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Default dependency paths for a standard installation using ./install-coolfluid-deps.pl with default options. Verify these directories exist before using them in coolfluid.conf. ```text mpi_dir = $HOME/local/coolfluid_deps/x86_64 ``` ```text curl_dir = $HOME/local/coolfluid_deps/x86_64 ``` ```text boost_dir = $HOME/local/coolfluid_deps/x86_64 ``` ```text petsc_dir = $HOME/local/coolfluid_deps/x86_64/petsc ``` ```text parmetis_dir = $HOME/local/coolfluid_deps/x86_64 ``` -------------------------------- ### Enable PARALUTION in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-enable-CUDA Add these two lines to $YOUR_COOLFluiD/coolfluid.conf after installing PARALUTION, substituting $PARALUTION_INSTALL_DIR with the full path to the installation directory. Enables the PARALUTION linear solver package for GPU architectures. ```text with_paralution = 1 ``` ```text paralution_dir = $PARALUTION_INSTALL_DIR ``` -------------------------------- ### First Order via Gradient Factor Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ICP.tex Use first order when starting from scratch or for very stiff problems by setting gradientFactor to 0. ```text Simulator.SubSystem.CellCenterFVM.Data.LinearLS2D.gradientFactor = 0. ``` -------------------------------- ### CMake: Build library vs single executable setup Source: https://github.com/andrealani/coolfluid/blob/master/src/Common/CMakeLists.txt This snippet handles the build type for the Common library. If not a single executable, it links the logcpp library and adds Common as a kernel library. Otherwise, it collects Common source files for the single executable build, also caching their files and libraries. ```CMake IF ( NOT CF_HAVE_SINGLE_EXEC ) LIST ( APPEND Common_cflibs logcpp ) CF_ADD_KERNEL_LIBRARY ( Common ) ELSE() FOREACH (AFILE ${Common_files} ) #LIST(APPEND coolfluid-solver_files ${CMAKE_CURRENT_SOURCE_DIR}/${AFILE} ) LIST(APPEND coolfluid-solver_files ../../src/Common/${AFILE} ) ENDFOREACH(AFILE) CF_CACHE_LIST_APPEND ( ${MYLIBNAME}_files ${coolfluid-solver_files} ) CF_CACHE_LIST_APPEND ( ${MYLIBNAME}_libs ${coolfluid-solver_libs} ) CF_CACHE_LIST_APPEND ( ${MYLIBNAME}_includedirs ${coolfluid-solver_includedirs} ) ENDIF() CF_WARN_ORPHAN_FILES() ``` -------------------------------- ### Define initial field analytical functions Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Defines the analytical functions for the initial field: independent variables (x y) and one expression per update variable (15 in this example). No spaces are allowed within a single function; the example is illustrative and has no physical sense. ```latex # independent variables (use "x y z" in 3D) Simulator.SubSystem.CellCenterFVM.InField.Vars = x y # arbitrarily complex function definitions (one per update variable, 15 in this case) # no space allowed within a single function # NOTE: this is just an illustrative example with no physical sense! Simulator.SubSystem.CellCenterFVM.InField.Def = \ 0. 0. 0. if(sqrt(x^2+y^2)<1.,0.00002854,0.00002854/2.) \ 0. if(sqrt(x^2+y^2)<1.,0.00000866,0.00000866/2.) 0. 0. 0. 0. 0. if(x<1.0,11360.,100.*(sqrt(x^2+y^2)-1.)) 0. 195. 195. ``` -------------------------------- ### CMake Minimum Version and Build Options Source: https://github.com/andrealani/coolfluid/blob/master/CMakeLists.txt Sets the minimum CMake version to 2.8.3 and configures build options like build type, skipping Fortran, and install prefix. ```cmake CMAKE_MINIMUM_REQUIRED( VERSION 2.8.3 FATAL_ERROR ) ``` -------------------------------- ### Set Mesh Adaptation Start Iteration Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Activates mesh adaptation at a specific iteration. StartIter sets the iteration number and SkipFirstIteration skips the first iteration. ```latex Simulator.SubSystem.MeFiAlgo.StartIter = 0 Simulator.SubSystem.MeFiAlgo.SkipFirstIteration = true ``` -------------------------------- ### Enable CUDA bindings in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-enable-CUDA Add these three lines to $YOUR_COOLFluiD/coolfluid.conf, substituting $CUDA_DIR with the full path to your CUDA installation. Required to enable CUDA bindings in COOLFluiD. ```text cudac = $CUDA_DIR/bin/nvcc ``` ```text cuda_dir = $CUDA_DIR ``` ```text withcuda = 1 ``` -------------------------------- ### Configure supersonic inlet (SuperInletFVMCC) with interactive parameters Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Configures a supersonic inlet using SuperInletFVMCC. The first block applies the BC to the Inlet TRS and defines the analytical functions via Vars and Def (all RhoivtTv variables must be prescribed). The second block adds interactive parameters for stiff cases (typically 3D) where starting with full velocity may be impossible; InteractiveVarIDs selects variable ID 11 (x-velocity) and InteractiveFactor must be <= 1.0. ```text # apply SuperInletFVMCC to the Inlet TRS Simulator.SubSystem.CellCenterFVM.SInlet.applyTRS = Inlet # analytical functions can be defined here as for InitState # (2-step option is not available though) Simulator.SubSystem.CellCenterFVM.SInlet.Vars = x y Simulator.SubSystem.CellCenterFVM.SInlet.Def = \ 0. 0. 0. 0.00002854 0. 0.00000866 0. 0. 0. 0. 0. 11360. 0. 195. 195. ``` ```text # the following settings tell the solver to multiply the variable with # ID = 11 (x-velocity) by a factor (must <= 1.0) Simulator.SubSystem.CellCenterFVM.SInlet.InteractiveVarIDs = 11 Simulator.SubSystem.CellCenterFVM.SInlet.InteractiveFactor = 1.0 ``` -------------------------------- ### Enable CFEnv.ErrorOnUnusedConfig Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex When activated, this option makes the simulation crash if there are spelling mistakes in the given options. Must be inactivated when starting from a Gambit file. ```latex CFEnv.ErrorOnUnusedConfig = true ``` -------------------------------- ### Recover from partial COOLFluiD download Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-install-on-Genius-(for-KU-Leuven-users) Recovers from a partial download by cleaning the source directory and re-running the installer with --download=0 (only update, no configuration) or --download=1 (update and configuration). Repeat as needed until the download completes successfully. ```bash svn cleanup COOLFluiD_Genius ; ./install_COOLFluiD.sh DEBUG_CUDA --download=0 ``` ```bash ./install_COOLFluiD.sh DEBUG_CUDA --download=1 ``` -------------------------------- ### COOLFluiD radiation coupling configuration (RadiativeTransferMonteCarloFVMCC, PARADE, RadRelaxationFactor) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Configuration blocks for the COOLFluiD radiation coupling. The first block sets up the Monte-Carlo radiative transfer command (RadiativeTransferMonteCarloFVMCC) with ray tracing, wall, and spectral parameters. The second block adds axisymmetric ray tracing settings (Axi, nCx, nCy). The third block configures the PARADE radiation library, including wavelength bounds and the installation path. The fourth block sets the RadRelaxationFactor for flow-radiation coupling; 0 means uncoupled, values between 0 and 1 enable under-relaxed coupling. The executable parade and its input file parade.con must be present in the working directory. ```plaintext # name of the command object implementing the radiation transport via Monte-Carlo Simulator.SubSystem.DataProcessing2.Comds = RadiativeTransferMonteCarloFVMCC # user-defined configuration name for "RadiativeTransferMonteCarloFVMCC" Simulator.SubSystem.DataProcessing2.Names = RT # Name of the topological region where to apply the algorithm Simulator.SubSystem.DataProcessing2.RT.applyTRS = InnerFaces # Names of the topological regions corresponding to solid walls Simulator.SubSystem.DataProcessing2.RT.wallTrsNames = Wall1 Wall2 # Names of the topological regions corresponding to symmetry planes Simulator.SubSystem.DataProcessing2.RT.symmetryTrsNames = Symmetry # Names of the topological regions corresponding to other boundaries Simulator.SubSystem.DataProcessing2.RT.boundaryTrsNames = Inlet Outlet # User-defined number of rays (photons) shot by each computational cell Simulator.SubSystem.DataProcessing2.RT.numberOfRays = 20 # Maximum number of visited cell during ray tracing Simulator.SubSystem.DataProcessing2.RT.MaxNbVisitedCells = 200 # Number of wavelengths to be considered to obtain a reduced spectra Simulator.SubSystem.DataProcessing2.RT.ReducedSpectralSize = 500 # Wall emissivity Simulator.SubSystem.DataProcessing2.RT.WallEmissivity = 0. # Wall absorption coefficient Simulator.SubSystem.DataProcessing2.RT.WallAbsorption = 0.644 # ID of the temperature in the state vector # (typically = number of species + spatial dimension) Simulator.SubSystem.DataProcessing2.RT.TemperatureID = 13 # Free stream temperature (if>0, it will impose q_rad=0 for the cell where active) #Simulator.SubSystem.DataProcessing2.RT.FreeStreamTemperature = 640. # Flag to tell to use the Planck function at the wall # (alternative to specifying WallEmissivity) #Simulator.SubSystem.DataProcessing2.RT.PlanckFunction = true ``` ```plaintext # Specify if to use the axisymmetric ray tracing Simulator.SubSystem.DataProcessing2.RT.Axi = true # Specify the number of cells in the streamwise direction Simulator.SubSystem.DataProcessing2.RT.nCx = 80 # Specify the number of cells normal to the wall Simulator.SubSystem.DataProcessing2.RT.nCy = 150 ``` ```plaintext # radiation library (only Parade is available at the moment) Simulator.SubSystem.DataProcessing2.RT.RadiationLibrary = Parade # flag telling if the flow is emission dominated (optically thin assumption) Simulator.SubSystem.DataProcessing2.RT.Parade.EmisDom = false # Minumum wavelength (must be consistent with "wavlo" declared in parade.con) Simulator.SubSystem.DataProcessing2.RT.Parade.WavelengthMin = 2000. # Maximum wavelength (must be consistent with "wavhi" declared in parade.con) Simulator.SubSystem.DataProcessing2.RT.Parade.WavelengthMax = 40000. # number of wavelengths for which radiative properties are computed at a time # if < "npoints" declared in parade.con, Monte-Carlo will compute radiative properties # for this number of wavelengths at once Simulator.SubSystem.DataProcessing2.RT.Parade.WavelengthStride = 10000 # Path where PARADE is installed with all data files Simulator.SubSystem.DataProcessing2.RT.Parade.path = /home/myuser/PARADEv3.1/parade31 # when set to 1, this allows for restarting from previously computed radiative properties # as long as the number of processors remains the same as in the previous run Simulator.SubSystem.DataProcessing1.RT.Parade.ReuseProperties = 0 ``` ```plaintext # RadRelaxationFactor = 0 uncoupled case # 0 < RadRelaxationFactor <= 1 coupled case, this is an under-relaxation factor Simulator.SubSystem.CellCenterFVM.Data.Euler2DCTNEQST.RadRelaxationFactor = 1.0 ``` -------------------------------- ### Enable interactive CFL Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Declares the CFL as interactive; its value is read from the interactive file (out.inter in the example). The line Simulator.SubSystem..Data.CFL.Interactive.CFL = 10.0 must be present and can be modified in the interactive file. ```latex Simulator.SubSystem..Data.CFL.ComputeCFL = Interactive ``` -------------------------------- ### Set MirrorMHD3DProjectionTanakaPFixFVMCC boundary condition on SlipWall Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Configures the ionosphere/magnetosphere boundary condition (MirrorMHD3DProjectionTanakaPFixFVMCC) on the SlipWall TRS. Sets the imposed density (rhoFixed) to 1.0 and pressure (pFixed) to 8.0, which should be 8 times the freestream solar wind plasma pressure (equal to 1.0 in this example). ```latex # apply MirrorMHD3DProjectionTanakaPFixFVMCC to the SlipWall # (TRS name coming from the initial mesh file) Simulator.SubSystem.CellCenterFVM.Wall.applyTRS = SlipWall # imposed density and pressure Simulator.SubSystem.CellCenterFVM.Wall.rhoFixed = 1.0 Simulator.SubSystem.CellCenterFVM.Wall.pFixed = 8.0 (This value should be 8 times the freestream solar wind plasma pressure value which is equal to 1.0 in this example.) ``` -------------------------------- ### CMakeLists.txt for MathTools library Source: https://github.com/andrealani/coolfluid/blob/master/src/MathTools/CMakeLists.txt CMake configuration for the MathTools library. It checks for Boost erfc support, selects the library name based on CF_HAVE_SINGLE_EXEC, lists source files, and either adds a kernel library or appends files to the single-executable target. The final CF_WARN_ORPHAN_FILES() call is part of the build setup. ```cmake IF ( NOT CF_HAVE_CUDA ) SET ( CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR} ) CHECK_CXX_SOURCE_COMPILES ( "#include int main(int argc, char* argv[]) { boost::math::erfc(0.); }" CF_HAVE_BOOST_ERFC ) ENDIF() ``` ```cmake IF ( NOT CF_HAVE_SINGLE_EXEC ) SET ( MYLIBNAME "MathTools" ) ELSE () SET ( MYLIBNAME "coolfluid-solver" ) ENDIF() ``` ```cmake LIST ( APPEND MathTools_files FindMinimum.hh MatrixInverter.cxx MatrixEigenSolver.hh IntersectSolver.hh JacobiEigenSolver.cxx LinearFunctor.hh MathConsts.hh MathFunctions.hh ZeroDeterminantException.hh ZeroDeterminantException.cxx RealMatrix.hh MatrixIntersect.hh MatrixInverter.hh InverterT.hh OutOfBoundsException.hh LUInverter.hh RealVector.hh ConstantFunctor.hh InverterDiag.hh LUInverter.cxx MathChecks.hh MathTools.hh MatrixIntersect.cxx MatrixEigenSolver.cxx JacobiEigenSolver.hh IntersectSolver.cxx LUInverterT.hh LUInverterT.ci MatrixInverterT.hh SVDInverter.hh SVDInverter.cxx RCM.h RCM.cxx CFMat.hh CFVecSlice.hh CFMatSlice.hh ExprT.hh MatExprT.hh ArrayT.hh MacrosET.hh CFVec.hh LeastSquaresSolver.cxx LeastSquaresSolver.hh # Function Parser (v4.5.2) from http://warp.povusers.org/FunctionParser/ FParser/fparser.cc #FParser/fparser_gmpint.hh FParser/fparser.hh #FParser/fparser_mpfr.hh FParser/fpconfig.hh FParser/fpoptimizer.cc ) ``` ```cmake IF ( NOT CF_HAVE_SINGLE_EXEC ) LIST ( APPEND MathTools_cflibs Common ) CF_ADD_KERNEL_LIBRARY ( MathTools ) ELSE() FOREACH (AFILE ${MathTools_files} ) LIST(APPEND coolfluid-solver_files ../../src/MathTools/${AFILE} ) ENDFOREACH(AFILE) CF_CACHE_LIST_APPEND ( ${MYLIBNAME}_files ${coolfluid-solver_files} ) ENDIF() CF_WARN_ORPHAN_FILES() ``` -------------------------------- ### Set PATH and LD_LIBRARY_PATH for COOLFluiD dependencies Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Updates environmental variables in .bashrc to include paths to the dependency libraries. The PATH and LD_LIBRARY_PATH variables determine which MPI installation is used when multiple coexist. ```latex export PATH=LDIR/bin:MDIR/bin:$PATH export LD_LIBRARY_PATH=LDIR/lib:MDIR/lib:MDIR/petsc/lib:$LD_LIBRARY_PATH ``` -------------------------------- ### Show help for generate_spherical_shell_Q2.py Source: https://github.com/andrealani/coolfluid/blob/master/tools/MeshGeneration/README.md Displays detailed help and all available options for the script. ```bash python generate_spherical_shell_Q2.py --help ``` -------------------------------- ### CFcase configuration file format Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex General format of a .CFcase configuration file: each line is KEY = VALUE, where the LHS is the keyword and the RHS is the value. Values can be strings, integers, booleans, floats, analytical functions, or arrays. Comments start with '#'. ```latex Simulator.OptionA = Value1 # use Value1 as value for OptionA Simulator.Value1.OptionB = Value2 # use Value2 as value for OptionB Simulator.Value1.Value2.OptionC = Value3 # use Value3 as value for OptionC Simulator.Value1.Value2.OptionD = Value4 # use Value4 as value for OptionD ``` -------------------------------- ### Reconfigure and compile Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Commands to remove the existing build directory, reconfigure with prepare.pl, and compile with make. ```bash ./prepare.pl --build=optim ``` ```bash make ``` -------------------------------- ### prepare.pl: Map library and include paths to environmental variables Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Declares mutationpp_librarydir and mutationpp_includedir in @dep_variables to map them to MUTATIONPP_LIBRARYDIR and MUTATIONPP_INCLUDEDIR. ```perl my @dep_variables = ( ..., "mutationpp_librarydir", "mutationpp_includedir"); ``` -------------------------------- ### prepare.pl: Define new variables with defaults Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Defines new variables (flags, library and include paths) with default values inside %default_options. The 'with_mutationpp' flag controls activation; the other variables set root, library, and include paths. ```perl 'with_mutationpp' => 0, ``` ```perl 'mutationpp_dir' => "", ``` ```perl 'mutationpp_librarydir' => "/usr/lib64", ``` ```perl 'mutationpp_includedir' => "/usr/include", ``` -------------------------------- ### Configure Backward Euler method Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Selects the Backward Euler convergence method and sets the convergence history file. Required libs: libBackwardEuler, libBackwardEulerMHD, libNewtonMethod. ```latex Simulator.SubSystem.ConvergenceMethod = BwdEuler #the filename into which the convergence history is to be written Simulator.SubSystem.BwdEuler.ConvergenceFile = ./convergence.plt ``` -------------------------------- ### prepare.pl: Add library to dependency list Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Adds 'mutationpp' to the @libraries array in prepare.pl, which creates the environmental variable MUTATIONPP_HOME. ```perl my @libraries = (..., "mutationpp", ...); ``` -------------------------------- ### Run COOLFluiD serially Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex Command to run COOLFluiD in serial mode (N=1). Requires the same working-directory setup as the parallel command. ```latex ./coolfluid-solver --scase ./myfile.CFcase ``` -------------------------------- ### Configure Mesh Loading and Restart Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ICP.tex Settings to load the mesh from a .CFmesh file and enable restarting from a previous solution. ```text Simulator.SubSystem.Default.listTRS = InnerFaces Symmetry Wall_torch_up Wall_torch_in Inlet Outlet_torch Simulator.SubSystem.MeshCreator = CFmeshFileReader Simulator.SubSystem.CFmeshFileReader.Data.FileName = torch_4-out-P1.CFmesh ``` ```text Simulator.SubSystem.CellCenterFVM.Restart = true ``` -------------------------------- ### Check out COOLFluiD modules with prepare.pl Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Checks out the selected modules specified in the coolfluid.conf configuration file. ```latex ./prepare.pl --config-file=coolfluid.conf ``` -------------------------------- ### Configure polynomial reconstruction (LeastSquareP1Setup, LinearLS2D, Venktn2D) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Frozen configuration for polynomial reconstruction using LeastSquareP1Setup and LinearLS2D with Venktn2D limiter. Includes stencil, limiter parameters, and a comment about backward compatibility. ```latex Simulator.SubSystem.CellCenterFVM.SetupCom = LeastSquareP1Setup Simulator.SubSystem.CellCenterFVM.SetupNames = Setup1 Simulator.SubSystem.CellCenterFVM.Setup1.stencil = FaceVertexPlusGhost Simulator.SubSystem.CellCenterFVM.UnSetupCom = LeastSquareP1UnSetup Simulator.SubSystem.CellCenterFVM.UnSetupNames = UnSetup1 Simulator.SubSystem.CellCenterFVM.Data.PolyRec = LinearLS2D Simulator.SubSystem.CellCenterFVM.Data.Limiter = Venktn2D Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.coeffEps = 1.0 Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.useFullStencil = true # set true the following for backward compatibility, but false should behave better Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.useNodalExtrapolationStencil = false Simulator.SubSystem.CellCenterFVM.Data.Venktn2D.length = 1.0 ``` -------------------------------- ### Multi-line value with backslash continuation Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex Example of a multi-line value in a .CFcase file using the backslash continuation character. Spaces before or after the line are irrelevant. ```latex Simulator.Example.arrays = 4 4 10 \ 10 4 \ 4 3 ``` -------------------------------- ### Enable all libraries in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Enables compilation of all COOLFluiD libraries. Requires at least 15GB of free disk space. ```text allactive = 1 ``` -------------------------------- ### Set SpaceMethod to FluctuationSplit Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_RDS_UnsteadyNavierStokes.tex Sets the residual method to FluctuationSplit in the COOLFluiD input file. This is the required solver selection for the RDS unsteady Navier-Stokes setup. ```text Simulator.SubSystem.SpaceMethod = FluctuationSplit ``` -------------------------------- ### Replace mixtureHMass call in MutationLibrarypp::setup() Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-use-Mutationpp In MutationLibrarypp::setup(), replace the old call with the new one. The old stable version of Mutation++ is outdated and won't compile with the current COOLFluiD. ```cpp m_gasMixture->mixtureHMass(T0) ``` ```cpp m_gasMixture->mixtureHMass() ``` -------------------------------- ### Set interactive CFL for BDF2/BwdEuler Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex Declares the CFL as interactive; its value is read from the interactive file (out.inter in the example). The second line must be present and can be modified in that file. ```latex Simulator.SubSystem.BDF2(or BwdEuler).Data.CFL.ComputeCFL = Interactive ``` ```latex Simulator.SubSystem.BDF2(or BwdEuler).Data.CFL.Interactive.CFL = 10.0 ``` -------------------------------- ### Sample solution at a point with DataProcessing2 Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_RDS_UnsteadyNavierStokes.tex Enables post-processing to sample the solution at a single point. It writes the evolution to samplingbis.plt at the location (1.0, 0.0) with a save rate of 1. ```text Simulator.SubSystem.DataPostProcessing = DataProcessing Simulator.SubSystem.DataPostProcessingNames = DataProcessing2 Simulator.SubSystem.DataProcessing2.ProcessRate = 1 Simulator.SubSystem.DataProcessing2.Comds = SamplingPoint Simulator.SubSystem.DataProcessing2.Names = SPoint Simulator.SubSystem.DataProcessing2.SPoint.OutputFile = samplingbis.plt Simulator.SubSystem.DataProcessing2.SPoint.location = 1.0 0.0 Simulator.SubSystem.DataProcessing2.SPoint.SaveRate = 1 ``` -------------------------------- ### Set space-time LDA splitter (SysSplitter=STKT_SysLDAC) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_RDS_UnsteadyNavierStokes.tex Uses the space-time LDA splitter STKT_SysLDAC for distribution coefficients. Only this version has been validated for the current problem; when starting from scratch it may be better to use STKT_SysNC. ```text Simulator.SubSystem.FluctuationSplit.Data.SysSplitter = STKT_SysLDAC ``` -------------------------------- ### Generate Makefiles with prepare.pl Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Generates all Makefiles for compilation. Add --config-file=name_of_your_file to use a different configuration file name. ```bash ./prepare.pl --build=optim ``` -------------------------------- ### Configure NewtonIterator method Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Selects the NewtonIterator convergence method and sets MaxSteps to 1 for steady implicit time stepping (first-order Backward Euler). Required lib: libNewtonMethod. MaxSteps must be > 1 only for unsteady simulations. ```latex Simulator.SubSystem.ConvergenceMethod = NewtonIterator # this value must be > 1 only for unsteady simulations Simulator.SubSystem.NewtonIterator.Data.MaxSteps = 1 ``` -------------------------------- ### Enable Mesh Fitting Algorithm (MeFiAlgo) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM.tex Configures the mesh fitting algorithm as a post-processing step. The DataPostProcessing and DataPostProcessingNames options activate the MeFiAlgo subsystem, while Comds and CollaboratorNames define the algorithm and its linear solver collaborator. ```latex Simulator.SubSystem.DataPostProcessing = DataProcessing Simulator.SubSystem.DataPostProcessingNames = MeFiAlgo Simulator.SubSystem.MeFiAlgo.Comds = MeshFittingAlgorithm Simulator.SubSystem.MeFiAlgo.Data.CollaboratorNames = MeshAlgoLSS ``` -------------------------------- ### Set mesh scaling factor Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Specifies a factor by which the input mesh must be divided. The name 'Scaling' is misleading. The scaling factor must only be used when starting from scratch, not when restarting from a CFmesh file containing the solution. ```text Simulator.SubSystem.CFmeshFileReader.Data.ScalingFactor = 1000. ``` -------------------------------- ### Configure Wall Boundary Conditions Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ICP.tex Set the isothermal wall temperature to 350K for the specified wall boundaries. ```text Simulator.SubSystem.CellCenterFVM.BcTorchWallUp.applyTRS = Wall_torch_up Simulator.SubSystem.CellCenterFVM.BcTorchWallUp.TWall = 350. Simulator.SubSystem.CellCenterFVM.BcTorchWallIn.applyTRS = Wall_torch_in Simulator.SubSystem.CellCenterFVM.BcTorchWallIn.TWall = 350. ``` -------------------------------- ### Save Limiter in CFmesh File Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ICP.tex Options to add to the CFcase before starting a second order computation (gradientFactor = 1.) to save the limiter in the CFmesh file. ExtraStateVarStrides must be the total number of equations (6 in this case). ```text Simulator.SubSystem.CFmesh.Data.ExtraStateVarNames = limiter # the following must be the total number of equations Simulator.SubSystem.CFmesh.Data.ExtraStateVarStrides = 6 ``` -------------------------------- ### Find Boost and define CF_HAVE_BOOST_* version macros Source: https://github.com/andrealani/coolfluid/blob/master/CMakeLists.txt Configures Boost discovery in CMake: sets static/multithreaded usage, defines a minimum version (1.42), and appends additional version strings for older CMake. Searches for the components thread, filesystem, system, regex, and unit_test_framework, then adds atomic and re-searches when Boost_LIB_VERSION is 1_79, 1_85, or 1_88. Finally logs the found include path, library version, and libraries, and adds a -DCF_HAVE_BOOST_* definition matching the detected Boost_LIB_VERSION. ```cmake SET ( Boost_USE_STATIC_LIBS ${CF_ENABLE_STATIC} ) SET ( Boost_USE_MULTITHREAD ON ) # find based on minimal version defined below SET ( Boost_FIND_VERSION ON ) SET ( Boost_FIND_VERSION_MAJOR "1" ) SET ( Boost_FIND_VERSION_MINOR "42" ) SET ( Boost_FIND_VERSION_PATCH "0" ) # older cmakes dont have these versions SET ( Boost_ADDITIONAL_VERSIONS "1.70" "1.66" "1.60" "1.60.0" "1.59" "1.59.0" "1.55" "1.55.0" "1.54" "1.54.0" "1.47" "1.47.0" "1.42" "1.42.0" "1.41" "1.41.0" "1.40" "1.40.0" "1.39" "1.39.0" ) # components to search for #IF ( CF_ENABLE_IBMSHARED OR CF_ENABLE_IBMSTATIC ) #LIST ( APPEND CF_Boost_COMPONENTS filesystem system regex unit_test_framework ) #ELSE() #ENDIF() LIST ( APPEND CF_Boost_COMPONENTS thread filesystem system regex unit_test_framework ) FIND_PACKAGE( Boost COMPONENTS ${CF_Boost_COMPONENTS} ) IF ("${Boost_LIB_VERSION}" STREQUAL "1_79" OR "${Boost_LIB_VERSION}" STREQUAL "1_85" OR "${Boost_LIB_VERSION}" STREQUAL "1_88") SET ( Boost_LIBRARIES "" ) LIST ( APPEND CF_Boost_COMPONENTS atomic ) FIND_PACKAGE( Boost COMPONENTS ${CF_Boost_COMPONENTS} ) ENDIF() LOG ( "Boost include path [${Boost_INCLUDE_DIR}]" ) LOG ( "Boost lib version [${Boost_LIB_VERSION}]" ) LOG ( "Boost libraries [${Boost_LIBRARIES}]" ) IF ("${Boost_LIB_VERSION}" STREQUAL "1_60" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_60 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_62" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_62 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_66" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_66 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_70" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_70 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_72" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_72 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_76" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_76 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_79" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_79 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_82" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_82 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_85" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_85 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_88" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_88 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_59" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_59 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_55" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_55 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_54" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_54 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_53" ) ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_53 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_47") ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_47 ) ELSEIF ("${Boost_LIB_VERSION}" STREQUAL "1_42") ADD_DEFINITIONS ( -DCF_HAVE_BOOST_1_42 ) ENDIF() ``` -------------------------------- ### prepare.pl: Map activation flag to environmental variable Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-interface-a-new-dependency-library Directly maps the activation flag 'with_mutationpp' to the environmental variable CF_ENABLE_MUTATIONPP for later use. ```perl setup_option('with_mutationpp', 'CF_ENABLE_MUTATIONPP'); ``` -------------------------------- ### Residual marker in test case file Source: https://github.com/andrealani/coolfluid/wiki/HOWTO define & run regression tests Place this line in a test case file to specify the residual value that cmake will compare against the simulation's final residual. The line must start with '### Residual = ' followed by a float. ```text ### Residual = -10.0011 ``` -------------------------------- ### Basic usage for icosphere and fibonacci methods Source: https://github.com/andrealani/coolfluid/blob/master/tools/MeshGeneration/README.md Basic usage for the two sphere generation methods. The icosphere method is the default and uses -l for refinement level; the fibonacci method requires -p for the number of points. ```bash python generate_spherical_shell_Q2.py -r INNER_RADIUS -R OUTER_RADIUS -l REFINEMENT_LEVEL -n NUM_LAYERS [options] ``` ```bash python generate_spherical_shell_Q2.py -r INNER_RADIUS -R OUTER_RADIUS -s fibonacci -p NUM_POINTS -n NUM_LAYERS [options] ``` -------------------------------- ### Load modules for wICE cluster Source: https://github.com/andrealani/coolfluid/blob/master/plugins/MHD/testcases/COCONUT/coconut_instructions.md Load the required modules for the wICE cluster environment. ```bash module load cluster/wice/batch module load CMake/3.29.3-GCCcore-13.3.0 module load PETSc/3.24.4-gfbf-2024a-MPICH ``` -------------------------------- ### Run COOLFluiD solver (mpirun and serial) Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_ATD.tex Run COOLFluiD in parallel with mpirun, replacing N with the number of processors, or serially without mpirun. A soft link or copy of the coolfluid-solver executable and coolfluid-solver.xml must be present in the working directory. ```bash mpirun -np N ./coolfluid-solver --scase ./myfile.CFcase ``` ```bash ./coolfluid-solver --scase ./myfile.CFcase ``` -------------------------------- ### Activate additional library in coolfluid.conf Source: https://github.com/andrealani/coolfluid/wiki/HOWTO-configure-&-compile Template for activating additional libraries in coolfluid.conf. Replace LIBRARYNAME with the actual library name; off is the default. ```text lib_LIBRARYNAME = on ``` -------------------------------- ### Specify required libraries with Simulator.Modules.Libs Source: https://github.com/andrealani/coolfluid/blob/master/doc/Manuals/COOLFluiD_FVM_MHD.tex Lists the COOLFluiD dynamic libraries needed for the simulation. Each section in the manual indicates the required libraries when applicable. ```latex Simulator.Modules.Libs = libCFmeshFileReader libMHD libFiniteVolume libFiniteVolumeMHD ... ```