diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict index 6a42118c719acefc87b101e6a3b491494806f159..937a96613b08264d73f0833e1be9e1e92f477845 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/controlDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/controlDict @@ -51,6 +51,9 @@ functions #include "cuttingPlane" #include "forceCoeffs" #include "ensightWrite" + + #include "solverInfo" + #include "graphFunctionObject" } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/graphFunctionObject b/tutorials/incompressible/simpleFoam/motorBike/system/graphFunctionObject new file mode 100644 index 0000000000000000000000000000000000000000..ba4f9a4a6716c67f135e5ab386f96c664a521204 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/system/graphFunctionObject @@ -0,0 +1,142 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +residualGraph1 +{ + // Mandatory entries + type graphFunctionObject; + libs (utilityFunctionObjects); + + functions + { + Ux + { + // Mandatory entries + object solverInfo1; + entry Ux_initial; + + // Optional entries + // title <string>; + // colour <labelVector>; + // dashes <labelList>; + } + Uy + { + object solverInfo1; + entry Uy_initial; + } + Uz + { + object solverInfo1; + entry Uz_initial; + } + p + { + object solverInfo1; + entry p_initial; + } + } + + // Optional entries + logScaleX no; + logScaleY yes; + xlabel "Iteration"; + ylabel "log10(Initial residual)"; + // xMin <scalar>; + // xMax <scalar>; + // yMin <scalar>; + // yMax <scalar>; + // width <label>; + // height <label>; + // strokeWidth <label>; + // drawGrid <bool>; + + // Inherited entries + writePrecision 6; + writeToFile true; + useUserTime true; + + region region0; + enabled true; + log true; + timeStart 0; + timeEnd 1000; + executeControl timeStep; + executeInterval 1; + writeControl writeTime; + writeInterval -1; +} + + +forceCoeffsGraph1 +{ + type graphFunctionObject; + libs (utilityFunctionObjects); + writeControl writeTime; + + logScaleX no; + logScaleY no; + + xlabel "Iteration"; + ylabel "Coefficient"; + + yMin -1; + yMax 1; + + functions + { + Cd + { + object forceCoeffs1; + entry Cd; + } + // CdMean + // { + // object valueAverage1; + // entry CdMean; + // } + Cd(f) + { + object forceCoeffs1; + entry Cd(f); + } + Cd(r) + { + object forceCoeffs1; + entry Cd(r); + } + Cl + { + object forceCoeffs1; + entry Cl; + //colour (0, 0, 0); + } + // ClMean + // { + // object valueAverage1; + // entry ClMean; + // } + Cl(f) + { + object forceCoeffs1; + entry Cl(f); + //colour (0, 0, 0); + title Cl(f); + } + Cl(r) + { + object forceCoeffs1; + entry Cl(r); + //colour (0, 0, 0); + title Cl(r); + } + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/solverInfo b/tutorials/incompressible/simpleFoam/motorBike/system/solverInfo new file mode 100644 index 0000000000000000000000000000000000000000..5c764aa47136cebc257d965e36ba6a6d0a5792f5 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/system/solverInfo @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2406 | +| \\ / A nd | Website: www.openfoam.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +solverInfo1 +{ + // Mandatory entries + type solverInfo; + libs (utilityFunctionObjects); + fields (U p); + + // Optional entries + writeResidualFields no; +} + + +// ************************************************************************* //