Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7d5e80c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
sayerhs committed Feb 9, 2024
0 parents commit 7c6a6ed
Show file tree
Hide file tree
Showing 92 changed files with 33,635 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3a959471a7de8990d22e67e32b21746d
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added .nojekyll
Empty file.
34 changes: 34 additions & 0 deletions _downloads/18dff83da7ace7fddabf45ced783dfa8/caelus_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- mode: yaml -*-
#
# Sample CPL configuration file
#

# Root CPL configuration node
caelus:
# Control logging of CPL library
logging:
log_to_file: true
log_file: ~/Caelus/cpl.log

# Configuration for Caelus CML or OpenFOAM versions
caelus_cml:
# Pick the development version of CML available; use "latest" to choose the
# latest version available.
default: "v2012"

# Versions that can be used with CPL
versions:
- version: "9.04"
path: ~/Caelus/caelus-9.04

- version: "10.04"
path: ~/Caelus/caelus-10.04

- version: "dev-gcc"
path: ~/Caelus/caelus-cml # Use latest git repository
mpi_path: /usr/local/openmpi # Use system OpenMPI
build_option: "linux64gcc++DPOpt" # Use the GCC version

- version: "v2012"
path: ~/OpenFOAM/OpenFOAM-v2012 # Use OpenFOAM
mpi_path: /usr/local/openmpi # Use system OpenMPI
98 changes: 98 additions & 0 deletions _downloads/3ced09f443a13b2670f950d07e692c9e/caelus_sim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# -*- mode: yaml -*-

# caelus_sim requires a simulation section in YAML file
simulation:

# Name of the parametric run top-level directory. Can also set using -n flag
# at command line which takes precedence
sim_name: airfoil_demo

# The template directory for creating case directories. Requires 'path'
# argument. Other optional variables can be provided to control clone behavior
template:
path: "./airfoil_template"
# copy_polymesh: no
# copy_zero: no
# copy_scripts: no
# extra_patterns: ["*.py"]

# This section details the parametric run options
simulation_setup:
# User defined format for case directory names
case_format: "Re_{Re:.1e}/aoa_{aoa:+06.2f}"

# The matrix of runs
run_matrix:
- Re: [1.0e6, 2.0e6]
aoa:
start: 0.0
stop: 2.0
step: 2.0

# Only run one Re for the negative AOA
- Re: [1.0e6]
aoa: [-4.0, -2.0]

# Other parameters that are passed to cmlControls file
constant_parameters:
density: 1.225
Uinf: 15.0
chord: 1.0
turbKe: 3.75e-07
turbulenceModel: kOmegaSST

# User-defined transformations on the variables
apply_transforms:
transform_type: code
# Only pass these variables to cmlControls
extract_vars: [velVector, Re, nuValue, liftVector, dragVector]
# Python code that is executed before generating case parameters
code: |
Re = float(Re)
aoaRad = np.radians(aoa)
Ux = Uinf * np.cos(aoaRad)
Uy = Uinf * np.sin(aoaRad)
velVector = np.array([Ux, Uy, 0.0])
nuValue = Uinf / Re
liftVector = np.array([-np.sin(aoaRad), np.cos(aoaRad), 0.0])
dragVector = np.array([np.cos(aoaRad), np.sin(aoaRad), 0.0])
# Configuration for running each case within this analysis group
run_configuration:
# Number of MPI ranks for parallel runs
num_ranks: 2
# Extra MPI arguments passed during parallel runs
# mpi_extra_args: -machinefile mymachines

# Should the case be reconstructed on successful run
reconstruct: no

# Modify the default template input files
change_inputs:
controlDict:
endTime: 1
writeFormat: binary

# Pre-processing actions to be performed before solve. The syntax is similar
# to the Tasks YAML interface. Note, the case manager will automatically
# perform decomposition and similar tasks. Users only need to provide
# non-standard pre-processing actions (e.g., copy actions, changeDictionary,
# or mesh generation) during the prep phase.
prep:
- copy_tree:
src: "0.orig"
dest: "0"

# Perform the solve
solve: simpleSolver

# solve:
# - solver: potentialSolver
# solver_args: "-initializeUBCs -noFunctionObjects"

# - solver: pimpleSolver

# Similar to prep, perform post-processing actions
# post:
# - run_command:
# cmd_name: "python ./my_post_process.py"
17 changes: 17 additions & 0 deletions _downloads/677089e2eb67a9158f73c51c1cc10d84/caelus_tasks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

tasks:
- clean_case:
remove_zero: no
remove_mesh: yes

- run_command:
cmd_name: blockMesh

- run_command:
cmd_name: pisoSolver

- process_logs:
log_file: pisoSolver.log
plot_residuals: true
residuals_plot_file: residuals.pdf
residuals_fields: [Ux, Uy]
Binary file not shown.
80 changes: 80 additions & 0 deletions _downloads/c4de47f7adbfabb70e48f8784e26584c/run_dambreak.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# -*- coding: utf-8 -*-

"""
Test low-level python execution interface
Works with tutorials/multiphase/vof/vofSolver/ras/damBreak
"""

import os
import sys
import shutil

import matplotlib.pyplot as plt

from caelus.config.cmlenv import cml_get_version
from caelus.io import DictFile, DecomposeParDict
from caelus.run.cmd import CaelusCmd
from caelus.run.core import get_mpi_size
from caelus.post.logs import LogProcessor, SolverLog
from caelus.post.plots import CaelusPlot

print("Searching for default caelus version...")
cenv_default = cml_get_version()

cenv = cenv_default
print("Using Caelus version: " + cenv.version)
print("Caelus path: " + cenv.project_dir)

status = 0
print("Executing blockMesh... ")
caelus_cmd = CaelusCmd("blockMesh", cml_env=cenv)
status = caelus_cmd()
if status != 0:
print("ERROR generating blockMesh. Exiting!")
sys.exit(1)

shutil.copy2("0/alpha1.org", "0/alpha1")

status = 0
print("Executing funkySetFields... ")
caelus_cmd = CaelusCmd("funkySetFields", cml_env=cenv)
caelus_cmd.cml_exe_args = "-latestTime"
status = caelus_cmd()
if status != 0:
print("ERROR running funkySetFields. Exiting!")
sys.exit(1)

decomp_dict = DecomposeParDict.read_if_present()

parallel = True if decomp_dict['numberOfSubdomains'] > 1 else False

status = 0
vof_cmd = CaelusCmd("vofSolver", cml_env=cenv)

if parallel:
print("Executing decomposePar... ")
decomp_cmd = CaelusCmd("decomposePar", cml_env=cenv)
decomp_cmd.cml_exe_args = ("-force")
status = decomp_cmd()
if status != 0:
print("ERROR running decomposePar. Exiting!")
sys.exit(1)
vof_cmd.num_mpi_ranks = decomp_dict['numberOfSubdomains']
vof_cmd.parallel = True
print("Executing vofSolver in parallel on %d cores..."%vof_cmd.num_mpi_ranks)

else:
print("Executing vofSolver...")

status = vof_cmd()
if status != 0:
print("ERROR running vofSolver. Exiting!")
sys.exit(1)

print("Processing logs... ")
clog = SolverLog(logfile="vofSolver.log")
cplot = CaelusPlot(clog.casedir)
cplot.plot_continuity_errors = True
cplot.plot_residuals_hist(plotfile="residuals.png")

67 changes: 67 additions & 0 deletions _downloads/cccfad79a7da0ca77f3f584f15addbc8/caelus_task_set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

tasks:
- task_set:
name: motorBikeSS
case_dir: ./motorBikeSS
tasks:
- clean_case:
remove_zero: yes
remove_mesh: no
preserve: [ "0.org" ]

- copy_tree:
src: "0.org"
dest: "0"

- run_command:
cmd_name: decomposePar
cmd_args: "-force"

- run_command:
cmd_name: potentialSolver
cmd_args: "-initialiseUBCs -noFunctionObjects"
parallel: True

- run_command:
cmd_name: simpleSolver
parallel: True

- run_command:
cmd_name: reconstructPar
cmd_args: "-latestTime"

- process_logs:
log_file: simpleSolver.log


- task_set:
name: motorBikeLES
case_dir: ./motorBikeLES
tasks:
- clean_case:
remove_zero: no
remove_mesh: yes

- copy_tree:
src: "../motorBikeSS/constant/polyMesh"
dest: "constant/polyMesh"

- copy_files:
src: "../motorBikeSS/500/*.gz"
dest: "0"

- run_command:
cmd_name: decomposePar
cmd_args: "-force"

- run_command:
cmd_name: pimpleSolver
parallel: True

- run_command:
cmd_name: reconstructPar
cmd_args: "-latestTime"

- process_logs:
log_file: pimpleSolver.log

Loading

0 comments on commit 7c6a6ed

Please sign in to comment.