From cddfe0e324da1e95c63fb9dfd92ead5f61e398d7 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Mon, 16 Dec 2024 19:50:24 +0000 Subject: [PATCH] TUT: motorBike - added example for foamReport --- .../simpleFoam/motorBike/system/controlDict | 1 + .../simpleFoam/motorBike/system/foamReport | 59 ++++++++++ .../motorBike/system/myReportTemplate.md | 104 ++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 tutorials/incompressible/simpleFoam/motorBike/system/foamReport create mode 100644 tutorials/incompressible/simpleFoam/motorBike/system/myReportTemplate.md diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 937a96613b..2e17d5d2c6 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -54,6 +54,7 @@ functions #include "solverInfo" #include "graphFunctionObject" + #include "foamReport" } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/foamReport b/tutorials/incompressible/simpleFoam/motorBike/system/foamReport new file mode 100644 index 0000000000..f90a2f0683 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/system/foamReport @@ -0,0 +1,59 @@ +foamReport1 +{ + type foamReport; + libs (utilityFunctionObjects); + + writeControl writeTime; + + template "/myReportTemplate.md"; + + substitutions + { + timing1 + { + type fileRegEx; + path "log.simpleFoam"; + + entries + { + executionTime "ExecutionTime = (.*) s Clock.*"; + } + } + divSchemes1 + { + type dictionaryValue; + path "/fvSchemes"; + + entries + { + divSchemes "divSchemes"; + } + } + fvSolution1 + { + type dictionaryValue; + path "/fvSolution"; + + entries + { + solver_p "solvers/p/solver"; + solver_p_tol "solvers/p/tolerance"; + solver_p_reltol "solvers/p/relTol"; + solver_U "solvers/U/solver"; + solver_U_tol "solvers/U/tolerance"; + solver_U_reltol "solvers/U/relTol"; + } + } + controlDict1 + { + type dictionaryValue; + path "/controlDict"; + + entries + { + initial_deltaT "deltaT"; + } + } + } +} + diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/myReportTemplate.md b/tutorials/incompressible/simpleFoam/motorBike/system/myReportTemplate.md new file mode 100644 index 0000000000..5cdb747cd4 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/system/myReportTemplate.md @@ -0,0 +1,104 @@ +--- +marp: true +paginate: true +--- + + + +# {{OF_EXECUTABLE}} : {{OF_CASE_NAME}} tutorial + +- Case: {{OF_CASE_PATH}} +- Submission: {{OF_CLOCK_START}} on {{OF_DATE_START}} +- Report time: {{OF_CLOCK_NOW}} on {{OF_DATE_NOW}} + +--- + +## Run information + +| Property | Value | +|----------------|--------------------| +| Host | {{OF_HOST}} | +| Processors | {{OF_NPROCS}} | +| Time steps | {{OF_TIME_INDEX}} | +| Initial deltaT | {{initial_deltaT}} | +| Current deltaT | {{OF_TIME_DELTAT}} | +| Execution time | {{executionTime}} | + +--- + +## OpenFOAM information + +| Property | Value | +|----------------|--------------------| +| Version | {{OF_VERSION}} | +| API | {{OF_API}} | +| Patch | {{OF_PATCH}} | +| Build | {{OF_BUILD}} | +| Architecture | {{OF_BUILD_ARCH}} | + +--- + +## Mesh statistics + +| Property | Value | +|-------------------|----------------------| +| Bounds | {{OF_MESH_BOUNDS_MIN}}{{OF_MESH_BOUNDS_MAX}} | +| Number of cells | {{OF_MESH_NCELLS}} | +| Number of faces | {{OF_MESH_NFACES}} | +| Number of points | {{OF_MESH_NPOINTS}} | +| Number of patches | {{OF_MESH_NPATCHES}} | + +--- + +## Linear solvers + +| Property | Value | tolerance(rel) | Tolerance(abs) | +|----------|----------------|------------------|---------------------| +| p | `{{solver_p}}` | {{solver_p_tol}} | {{solver_p_reltol}} | +| U | `{{solver_U}}` | {{solver_u_tol}} | {{solver_u_reltol}} | + +--- + +## Numerical scehemes + +The chosen divergence schemes comprised: + +~~~ +{{divSchemes}} +~~~ + +--- + +## Graphs + +Residuals + +![]({{OF_CASE_PATH}}/postProcessing/residualGraph1/{{OF_TIME}}/residualGraph1.svg) + +--- + +## Results + +Forces + +![]({{OF_CASE_PATH}}/postProcessing/forceCoeffsGraph1/{{OF_TIME}}/forceCoeffsGraph1.svg) + +--- + +Made using Open∇FOAM v2412 from https://openfoam.com