From fb3380a12487c2a76115abe49ab0bcccde3a5cdb Mon Sep 17 00:00:00 2001 From: Ping He Date: Thu, 21 Mar 2024 10:01:29 -0500 Subject: [PATCH] Used new reg_test_files and added rhoPimple test. (#609) * Switched the reg_test input to a repo. * Added the DARhoPimple test. * Fixed an issue in the make file for rhopimple. * Added the missing make file for rhopimple. --- src/adjoint/Make/files_Compressible | 5 +- tests/Allclean | 2 +- tests/Allrun | 20 ++- tests/refs/DAFoam_Test_DARhoPimpleFoamRef.txt | 14 ++ tests/runTests_DAHeatTransferFoam.py | 2 +- tests/runTests_DALaplacianFoam.py | 2 +- tests/runTests_DAPimpleDyMFoam.py | 2 +- tests/runTests_DAPimpleFoam.py | 2 +- tests/runTests_DAPimpleFoamField.py | 2 +- tests/runTests_DAPimpleFoamTurbModels.py | 2 +- tests/runTests_DAPisoFoam.py | 2 +- tests/runTests_DAPisoFoamACTL.py | 2 +- tests/runTests_DARhoPimpleFoam.py | 154 ++++++++++++++++++ tests/runTests_DARhoSimpleCFoam.py | 2 +- tests/runTests_DARhoSimpleCFoamAD.py | 2 +- tests/runTests_DARhoSimpleFoam.py | 2 +- tests/runTests_DARhoSimpleFoamAD.py | 2 +- tests/runTests_DARhoSimpleFoamFIML.py | 2 +- tests/runTests_DARhoSimpleFoamMRFAD.py | 2 +- tests/runTests_DARhoSimpleFoamUBend.py | 2 +- tests/runTests_DAScalarTransportFoam.py | 2 +- tests/runTests_DASimpleFoam.py | 2 +- tests/runTests_DASimpleFoamAD.py | 2 +- tests/runTests_DASimpleFoamField.py | 2 +- tests/runTests_DASimpleFoamFieldForwardAD.py | 2 +- ...pleFoamFieldInversionObjectiveFunctions.py | 2 +- tests/runTests_DASimpleFoamForwardAD.py | 2 +- tests/runTests_DASimpleFoamMRF.py | 2 +- tests/runTests_DASimpleFoamMRFForwardAD.py | 2 +- ...s_DASimpleFoamkOmegaFieldInversionOmega.py | 2 +- tests/runTests_DASimpleFoamkOmegaSSTFIML.py | 2 +- ...sts_DASimpleFoamkOmegaSSTFieldInversion.py | 2 +- tests/runTests_DASimpleTFoam.py | 2 +- tests/runTests_DASolidDisplacementFoam.py | 2 +- tests/runTests_DATurboFoamSubsonic.py | 2 +- tests/runTests_DATurboFoamTransonic.py | 2 +- tests/runTests_Integration.py | 2 +- tests/runTests_MphysAero.py | 2 +- tests/runTests_MphysAeroAcoustic.py | 2 +- tests/runTests_MphysAeroField.py | 2 +- tests/runTests_MphysAeroFixedPoint.py | 2 +- tests/runTests_MphysAeroOpt.py | 2 +- tests/runTests_MphysAeroProp.py | 2 +- tests/runTests_MphysAeroPropCoupled.py | 2 +- tests/runTests_MphysAeroStructOpt.py | 2 +- tests/runTests_MphysAeroThermal.py | 2 +- tests/runTests_MphysCheckPartials.py | 2 +- tests/runTests_MphysCheckPartials1.py | 2 +- tests/runTests_Primal.py | 2 +- 49 files changed, 228 insertions(+), 55 deletions(-) create mode 100755 tests/refs/DAFoam_Test_DARhoPimpleFoamRef.txt create mode 100755 tests/runTests_DARhoPimpleFoam.py diff --git a/src/adjoint/Make/files_Compressible b/src/adjoint/Make/files_Compressible index afd4d1b8..a6c2c724 100755 --- a/src/adjoint/Make/files_Compressible +++ b/src/adjoint/Make/files_Compressible @@ -31,6 +31,7 @@ DARegression/DARegression.C DAStateInfo/DAStateInfo.C DAStateInfo/DAStateInfoRhoSimpleFoam.C DAStateInfo/DAStateInfoRhoSimpleCFoam.C +DAStateInfo/DAStateInfoRhoPimpleFoam.C DAStateInfo/DAStateInfoTurboFoam.C DAIndex/DAIndex.C @@ -60,6 +61,7 @@ DAFvSource/DAFvSourceActuatorDisk.C DAResidual/DAResidual.C DAResidual/DAResidualDummy.C DAResidual/DAResidualRhoSimpleFoam.C +DAResidual/DAResidualRhoPimpleFoam.C DAResidual/DAResidualRhoSimpleCFoam.C DAResidual/DAResidualTurboFoam.C @@ -89,6 +91,7 @@ DALinearEqn/DALinearEqn.C DASolver/DASolver.C DASolver/DARhoSimpleFoam/DARhoSimpleFoam.C DASolver/DARhoSimpleCFoam/DARhoSimpleCFoam.C +DASolver/DARhoPimpleFoam/DARhoPimpleFoam.C DASolver/DATurboFoam/DATurboFoam.C boundaryConditions/homTemp/homTempFvPatchScalarField.C @@ -101,7 +104,7 @@ models/SpalartAllmarasFv3/makeSpalartAllmarasFv3Compressible.C models/SpalartAllmarasFv3FieldInversion/makeSpalartAllmarasFv3FieldInversionCompressible.C models/kOmegaSSTFieldInversion/makekOmegaSSTFieldInversionCompressible.C models/kOmegaFieldInversionOmega/makekOmegaFieldInversionOmegaCompressible.C - +models/pimpleControlDF/pimpleControlDF.C models/MRFDF/MRFZoneDF.C models/MRFDF/MRFZoneListDF.C diff --git a/tests/Allclean b/tests/Allclean index ce0e67b1..3bfa1d7f 100755 --- a/tests/Allclean +++ b/tests/Allclean @@ -5,4 +5,4 @@ if [ -z "$WM_PROJECT" ]; then exit 1 fi -rm -rf input __pycache__ +rm -rf reg_test_files-main __pycache__ diff --git a/tests/Allrun b/tests/Allrun index 371f7d87..07087979 100755 --- a/tests/Allrun +++ b/tests/Allrun @@ -5,12 +5,12 @@ if [ -z "$WM_PROJECT" ]; then exit 1 fi -# check if we need to download input.tar.gz -if [ -f "input.tar.gz" ]; then - echo "input.tar.gz already exists." +# check if we need to download reg_test_files-main.tar.gz +if [ -f "reg_test_files-main.tar.gz" ]; then + echo "reg_test_files-main.tar.gz already exists." else - echo "Downloading input.tar.gz" - wget https://github.com/dafoam/files/releases/download/v1.0.0/input.tar.gz --no-check-certificate + echo "Downloading reg_test_files-main.tar.gz" + wget https://github.com/DAFoam/reg_test_files/archive/refs/heads/main.tar.gz -O reg_test_files-main.tar.gz --no-check-certificate fi if [ -z "$1" ]; then @@ -22,8 +22,8 @@ fi function runTests() { - rm -rf input DAFoam_Test_${1}.txt - tar -zxf input.tar.gz + rm -rf reg_test_files-main DAFoam_Test_${1}.txt + tar -zxf reg_test_files-main.tar.gz if [ -z "$DF_CHECK_COVERAGE" ]; then mpirun --oversubscribe -np 4 python runTests_${1}.py $@ | tee DAFoam_Test_${1}.txt if [ "${PIPESTATUS[0]}" -ne "0" ]; then @@ -55,8 +55,8 @@ function runTests() function runTestsSerial() { - rm -rf input DAFoam_Test_${1}.txt - tar -zxf input.tar.gz + rm -rf reg_test_files-main DAFoam_Test_${1}.txt + tar -zxf reg_test_files-main.tar.gz if [ -z "$DF_CHECK_COVERAGE" ]; then python runTests_${1}.py $@ | tee DAFoam_Test_${1}.txt if [ "${PIPESTATUS[0]}" -ne "0" ]; then @@ -119,6 +119,7 @@ case $argm in runTests DARhoSimpleFoam runTests DARhoSimpleFoamUBend runTests DARhoSimpleCFoam + runTests DARhoPimpleFoam if [ -f "$DAFOAM_ROOT_PATH/OpenFOAM/sharedLibs/libDAFoamCompressibleADR.so" ]; then runTests DARhoSimpleFoamMRFAD runTests DARhoSimpleFoamAD @@ -185,6 +186,7 @@ case $argm in runTests DARhoSimpleFoam runTests DARhoSimpleFoamUBend runTests DARhoSimpleCFoam + runTests DARhoPimpleFoam if [ -f "$DAFOAM_ROOT_PATH/OpenFOAM/sharedLibs/libDAFoamCompressibleADR.so" ]; then runTests DARhoSimpleFoamMRFAD runTests DARhoSimpleFoamAD diff --git a/tests/refs/DAFoam_Test_DARhoPimpleFoamRef.txt b/tests/refs/DAFoam_Test_DARhoPimpleFoamRef.txt new file mode 100755 index 00000000..2e4bf7f1 --- /dev/null +++ b/tests/refs/DAFoam_Test_DARhoPimpleFoamRef.txt @@ -0,0 +1,14 @@ +Dictionary Key: CD +@value 0.2304630624535831 1e-08 1e-10 +Dictionary Key: CL +@value 6.3056661425586 1e-08 1e-10 +Dictionary Key: fail +@value 0 1e-08 1e-10 +Dictionary Key: CD +Dictionary Key: twist +@value -0.1045060854662659 0.0001 1e-06 +Dictionary Key: CL +Dictionary Key: twist +@value -0.2190748076682245 0.0001 1e-06 +Dictionary Key: fail +@value 0 0.0001 1e-06 \ No newline at end of file diff --git a/tests/runTests_DAHeatTransferFoam.py b/tests/runTests_DAHeatTransferFoam.py index 3187c3fd..254ad8e4 100755 --- a/tests/runTests_DAHeatTransferFoam.py +++ b/tests/runTests_DAHeatTransferFoam.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/ChannelConjugateHeat/thermal") +os.chdir("./reg_test_files-main/ChannelConjugateHeat/thermal") aeroOptions = { "designSurfaces": ["channel_outer", "channel_inner", "channel_sides"], diff --git a/tests/runTests_DALaplacianFoam.py b/tests/runTests_DALaplacianFoam.py index a35ff992..0d75e8b2 100755 --- a/tests/runTests_DALaplacianFoam.py +++ b/tests/runTests_DALaplacianFoam.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/flange") +os.chdir("./reg_test_files-main/flange") # test incompressible solvers aeroOptions = { diff --git a/tests/runTests_DAPimpleDyMFoam.py b/tests/runTests_DAPimpleDyMFoam.py index b89b73dd..c89e9c11 100755 --- a/tests/runTests_DAPimpleDyMFoam.py +++ b/tests/runTests_DAPimpleDyMFoam.py @@ -8,7 +8,7 @@ import os from testFuncs import * -os.chdir("./input/NACA0012DynamicMesh") +os.chdir("./reg_test_files-main/NACA0012DynamicMesh") replace_text_in_file("system/controlDict", "endTime 0.01;", "endTime 0.001;") diff --git a/tests/runTests_DAPimpleFoam.py b/tests/runTests_DAPimpleFoam.py index 23f8a2f6..dc9a4171 100755 --- a/tests/runTests_DAPimpleFoam.py +++ b/tests/runTests_DAPimpleFoam.py @@ -20,7 +20,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012Unsteady") +os.chdir("./reg_test_files-main/NACA0012Unsteady") if gcomm.rank == 0: os.system("rm -rf processor*") diff --git a/tests/runTests_DAPimpleFoamField.py b/tests/runTests_DAPimpleFoamField.py index ab91e329..42e660f7 100755 --- a/tests/runTests_DAPimpleFoamField.py +++ b/tests/runTests_DAPimpleFoamField.py @@ -20,7 +20,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012Unsteady") +os.chdir("./reg_test_files-main/NACA0012Unsteady") if gcomm.rank == 0: os.system("rm -rf processor*") diff --git a/tests/runTests_DAPimpleFoamTurbModels.py b/tests/runTests_DAPimpleFoamTurbModels.py index 62360974..3d0384a1 100755 --- a/tests/runTests_DAPimpleFoamTurbModels.py +++ b/tests/runTests_DAPimpleFoamTurbModels.py @@ -19,7 +19,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012Unsteady") +os.chdir("./reg_test_files-main/NACA0012Unsteady") funcs = {} diff --git a/tests/runTests_DAPisoFoam.py b/tests/runTests_DAPisoFoam.py index d34f467e..86a63a04 100755 --- a/tests/runTests_DAPisoFoam.py +++ b/tests/runTests_DAPisoFoam.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DAPisoFoamACTL.py b/tests/runTests_DAPisoFoamACTL.py index feb92490..4218579b 100755 --- a/tests/runTests_DAPisoFoamACTL.py +++ b/tests/runTests_DAPisoFoamACTL.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoPimpleFoam.py b/tests/runTests_DARhoPimpleFoam.py new file mode 100755 index 00000000..ba9fcdd4 --- /dev/null +++ b/tests/runTests_DARhoPimpleFoam.py @@ -0,0 +1,154 @@ +#!/usr/bin/env python +""" +Run Python tests for DARhoPimpleFoam +""" + +from mpi4py import MPI +from dafoam import PYDAFOAM, optFuncs +import sys +import os +from pygeo import * +from pyspline import * +from idwarp import * +import numpy as np +from testFuncs import * + +calcFDSens = 0 +if len(sys.argv) != 1: + if sys.argv[1] == "calcFDSens": + calcFDSens = 1 + +gcomm = MPI.COMM_WORLD + +os.chdir("./reg_test_files-main/NACA0012UnsteadyComp") + +if gcomm.rank == 0: + os.system("rm -rf processor*") + +twist0 = 0 +U0 = 100 +T0 = 300.0 +p0 = 101325.0 +rho0 = p0 / 287.0 / T0 +A0 = 0.1 +nuTilda0 = 1e-4 + +# test incompressible solvers +daOptions = { + "designSurfaces": ["wing"], + "solverName": "DARhoPimpleFoam", + "primalBC": {"useWallFunction": True}, + "unsteadyAdjoint": { + "mode": "timeAccurate", + "PCMatPrecomputeInterval": 20, + "PCMatUpdateInterval": 1, + "objFuncTimeOperator": "average", + }, + "printIntervalUnsteady": 1, + "objFunc": { + "CD": { + "part1": { + "type": "force", + "source": "patchToFace", + "patches": ["wing"], + "directionMode": "fixedDirection", + "direction": [1.0, 0.0, 0.0], + "scale": 1.0 / (0.5 * U0 * U0 * A0 * rho0), + "addToAdjoint": True, + } + }, + "CL": { + "part1": { + "type": "force", + "source": "patchToFace", + "patches": ["wing"], + "directionMode": "fixedDirection", + "direction": [0.0, 1.0, 0.0], + "scale": 1.0 / (0.5 * U0 * U0 * A0 * rho0), + "addToAdjoint": True, + } + }, + }, + "adjStateOrdering": "cell", + "adjEqnOption": { + "gmresRelTol": 1.0e-8, + "pcFillLevel": 1, + "jacMatReOrdering": "natural", + "useNonZeroInitGuess": True, + }, + "normalizeStates": { + "U": U0, + "p": p0, + "T": T0, + "nuTilda": 1e-3, + "phi": 1.0, + }, + "designVar": { + "twist": {"designVarType": "FFD"}, + }, +} + +# mesh warping parameters, users need to manually specify the symmetry plane +meshOptions = { + "gridFile": os.getcwd(), + "fileType": "OpenFOAM", + # point and normal for the symmetry plane + "symmetryPlanes": [[[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]], [[0.0, 0.0, 0.1], [0.0, 0.0, 1.0]]], +} + +# ============================================================================= +# Design variable setup +# ============================================================================= +DVGeo = DVGeometry("./FFD/FFD.xyz") +DVGeo.addRefAxis("bodyAxis", xFraction=0.25, alignIndex="k") + + +def twist(val, geo): + for i in range(2): + geo.rot_z["bodyAxis"].coef[i] = val[0] + + +DVGeo.addGlobalDV("twist", [twist0], twist, lower=-100.0, upper=100.0, scale=1.0) + + +# ============================================================================= +# DAFoam initialization +# ============================================================================= +DASolver = PYDAFOAM(options=daOptions, comm=gcomm) +DASolver.setDVGeo(DVGeo) +mesh = USMesh(options=meshOptions, comm=gcomm) +DASolver.printFamilyList() +DASolver.setMesh(mesh) +evalFuncs = [] +DASolver.setEvalFuncs(evalFuncs) + +# ============================================================================= +# Constraint setup +# ============================================================================= +DVCon = DVConstraints() +DVCon.setDVGeo(DVGeo) +DVCon.setSurface(DASolver.getTriangulatedMeshSurface(groupName=DASolver.designSurfacesGroup)) + +# ============================================================================= +# Initialize optFuncs for optimization +# ============================================================================= +optFuncs.DASolver = DASolver +optFuncs.DVGeo = DVGeo +optFuncs.DVCon = DVCon +optFuncs.evalFuncs = evalFuncs +optFuncs.gcomm = gcomm + +# Run +if calcFDSens == 1: + optFuncs.calcFDSens() +else: + DASolver.runColoring() + xDV = DVGeo.getValues() + funcs = {} + funcs, fail = optFuncs.calcObjFuncValues(xDV) + funcsSens = {} + funcsSens, fail = optFuncs.calcObjFuncSens(xDV, funcs) + + if gcomm.rank == 0: + reg_write_dict(funcs, 1e-8, 1e-10) + reg_write_dict(funcsSens, 1e-4, 1e-6) diff --git a/tests/runTests_DARhoSimpleCFoam.py b/tests/runTests_DARhoSimpleCFoam.py index af569702..bff6d45f 100755 --- a/tests/runTests_DARhoSimpleCFoam.py +++ b/tests/runTests_DARhoSimpleCFoam.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleCFoamAD.py b/tests/runTests_DARhoSimpleCFoamAD.py index 9b5cae03..f8fb6543 100755 --- a/tests/runTests_DARhoSimpleCFoamAD.py +++ b/tests/runTests_DARhoSimpleCFoamAD.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleFoam.py b/tests/runTests_DARhoSimpleFoam.py index 73a694b8..529915b2 100755 --- a/tests/runTests_DARhoSimpleFoam.py +++ b/tests/runTests_DARhoSimpleFoam.py @@ -25,7 +25,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeSnappyHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeSnappyHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleFoamAD.py b/tests/runTests_DARhoSimpleFoamAD.py index a73b0336..f5cf443e 100755 --- a/tests/runTests_DARhoSimpleFoamAD.py +++ b/tests/runTests_DARhoSimpleFoamAD.py @@ -25,7 +25,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeSnappyHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeSnappyHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleFoamFIML.py b/tests/runTests_DARhoSimpleFoamFIML.py index 5665622d..ca50e03b 100755 --- a/tests/runTests_DARhoSimpleFoamFIML.py +++ b/tests/runTests_DARhoSimpleFoamFIML.py @@ -25,7 +25,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeSnappyHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeSnappyHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleFoamMRFAD.py b/tests/runTests_DARhoSimpleFoamMRFAD.py index b0f5c8ea..96e4245e 100755 --- a/tests/runTests_DARhoSimpleFoamMRFAD.py +++ b/tests/runTests_DARhoSimpleFoamMRFAD.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DARhoSimpleFoamUBend.py b/tests/runTests_DARhoSimpleFoamUBend.py index a9047782..354d9775 100755 --- a/tests/runTests_DARhoSimpleFoamUBend.py +++ b/tests/runTests_DARhoSimpleFoamUBend.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/UBendDuct") +os.chdir("./reg_test_files-main/UBendDuct") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DAScalarTransportFoam.py b/tests/runTests_DAScalarTransportFoam.py index 25b3bd98..cea809d7 100755 --- a/tests/runTests_DAScalarTransportFoam.py +++ b/tests/runTests_DAScalarTransportFoam.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/pitzDailyScalarTransport") +os.chdir("./reg_test_files-main/pitzDailyScalarTransport") TRef = 1.0 diff --git a/tests/runTests_DASimpleFoam.py b/tests/runTests_DASimpleFoam.py index d61128e6..8ec57dad 100755 --- a/tests/runTests_DASimpleFoam.py +++ b/tests/runTests_DASimpleFoam.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamAD.py b/tests/runTests_DASimpleFoamAD.py index 8dcd88bb..6658ec86 100755 --- a/tests/runTests_DASimpleFoamAD.py +++ b/tests/runTests_DASimpleFoamAD.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamField.py b/tests/runTests_DASimpleFoamField.py index dbfe0aa3..2b5b96c1 100755 --- a/tests/runTests_DASimpleFoamField.py +++ b/tests/runTests_DASimpleFoamField.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012FieldInversion") +os.chdir("./reg_test_files-main/NACA0012FieldInversion") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamFieldForwardAD.py b/tests/runTests_DASimpleFoamFieldForwardAD.py index c88d04cb..ec7f1b8e 100755 --- a/tests/runTests_DASimpleFoamFieldForwardAD.py +++ b/tests/runTests_DASimpleFoamFieldForwardAD.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012BetaSA") +os.chdir("./reg_test_files-main/NACA0012BetaSA") replace_text_in_file("constant/turbulenceProperties", "RASModel SpalartAllmarasFv3Beta;", "RASModel SpalartAllmarasFv3FieldInversion;") diff --git a/tests/runTests_DASimpleFoamFieldInversionObjectiveFunctions.py b/tests/runTests_DASimpleFoamFieldInversionObjectiveFunctions.py index 0677b6f1..602c3d6d 100755 --- a/tests/runTests_DASimpleFoamFieldInversionObjectiveFunctions.py +++ b/tests/runTests_DASimpleFoamFieldInversionObjectiveFunctions.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012FieldInversion") +os.chdir("./reg_test_files-main/NACA0012FieldInversion") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamForwardAD.py b/tests/runTests_DASimpleFoamForwardAD.py index e7b453e1..1d165301 100755 --- a/tests/runTests_DASimpleFoamForwardAD.py +++ b/tests/runTests_DASimpleFoamForwardAD.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamMRF.py b/tests/runTests_DASimpleFoamMRF.py index 7cb1d0ea..f8100c49 100755 --- a/tests/runTests_DASimpleFoamMRF.py +++ b/tests/runTests_DASimpleFoamMRF.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamMRFForwardAD.py b/tests/runTests_DASimpleFoamMRFForwardAD.py index eff950c7..92a3326c 100755 --- a/tests/runTests_DASimpleFoamMRFForwardAD.py +++ b/tests/runTests_DASimpleFoamMRFForwardAD.py @@ -15,7 +15,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamkOmegaFieldInversionOmega.py b/tests/runTests_DASimpleFoamkOmegaFieldInversionOmega.py index b16ac749..4a21d73d 100755 --- a/tests/runTests_DASimpleFoamkOmegaFieldInversionOmega.py +++ b/tests/runTests_DASimpleFoamkOmegaFieldInversionOmega.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012FieldInversion") +os.chdir("./reg_test_files-main/NACA0012FieldInversion") replace_text_in_file("constant/turbulenceProperties", "RASModel SpalartAllmarasFv3FieldInversion;", "RASModel kOmegaFieldInversionOmega;") diff --git a/tests/runTests_DASimpleFoamkOmegaSSTFIML.py b/tests/runTests_DASimpleFoamkOmegaSSTFIML.py index f1e179a0..10507c97 100755 --- a/tests/runTests_DASimpleFoamkOmegaSSTFIML.py +++ b/tests/runTests_DASimpleFoamkOmegaSSTFIML.py @@ -12,7 +12,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASimpleFoamkOmegaSSTFieldInversion.py b/tests/runTests_DASimpleFoamkOmegaSSTFieldInversion.py index 64566557..27d9a86e 100755 --- a/tests/runTests_DASimpleFoamkOmegaSSTFieldInversion.py +++ b/tests/runTests_DASimpleFoamkOmegaSSTFieldInversion.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012FieldInversion") +os.chdir("./reg_test_files-main/NACA0012FieldInversion") replace_text_in_file("constant/turbulenceProperties", "RASModel SpalartAllmarasFv3FieldInversion;", "RASModel kOmegaSSTFieldInversion;") diff --git a/tests/runTests_DASimpleTFoam.py b/tests/runTests_DASimpleTFoam.py index ef81db44..9b641e3c 100755 --- a/tests/runTests_DASimpleTFoam.py +++ b/tests/runTests_DASimpleTFoam.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/UBendDuct") +os.chdir("./reg_test_files-main/UBendDuct") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DASolidDisplacementFoam.py b/tests/runTests_DASolidDisplacementFoam.py index a524394d..5ce5a27c 100755 --- a/tests/runTests_DASolidDisplacementFoam.py +++ b/tests/runTests_DASolidDisplacementFoam.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/PlateHole") +os.chdir("./reg_test_files-main/PlateHole") if gcomm.rank == 0: os.system("rm -rf processor*") diff --git a/tests/runTests_DATurboFoamSubsonic.py b/tests/runTests_DATurboFoamSubsonic.py index 18c5abf1..dbfba780 100755 --- a/tests/runTests_DATurboFoamSubsonic.py +++ b/tests/runTests_DATurboFoamSubsonic.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_DATurboFoamTransonic.py b/tests/runTests_DATurboFoamTransonic.py index 3c0ef103..c6d1ebef 100755 --- a/tests/runTests_DATurboFoamTransonic.py +++ b/tests/runTests_DATurboFoamTransonic.py @@ -21,7 +21,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_Integration.py b/tests/runTests_Integration.py index 2d214ed8..d2c49c06 100755 --- a/tests/runTests_Integration.py +++ b/tests/runTests_Integration.py @@ -16,7 +16,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_MphysAero.py b/tests/runTests_MphysAero.py index 1222103d..86b7c1ed 100755 --- a/tests/runTests_MphysAero.py +++ b/tests/runTests_MphysAero.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.incompressible 0") diff --git a/tests/runTests_MphysAeroAcoustic.py b/tests/runTests_MphysAeroAcoustic.py index f0e50625..78788b63 100755 --- a/tests/runTests_MphysAeroAcoustic.py +++ b/tests/runTests_MphysAeroAcoustic.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CompressorFluid") +os.chdir("./reg_test_files-main/CompressorFluid") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.compressible 0") diff --git a/tests/runTests_MphysAeroField.py b/tests/runTests_MphysAeroField.py index 0c2cd422..0198f655 100755 --- a/tests/runTests_MphysAeroField.py +++ b/tests/runTests_MphysAeroField.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.incompressible 0") diff --git a/tests/runTests_MphysAeroFixedPoint.py b/tests/runTests_MphysAeroFixedPoint.py index b0ec84fd..ea1ddd9e 100755 --- a/tests/runTests_MphysAeroFixedPoint.py +++ b/tests/runTests_MphysAeroFixedPoint.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.incompressible 0") diff --git a/tests/runTests_MphysAeroOpt.py b/tests/runTests_MphysAeroOpt.py index e8194203..8227e5a1 100755 --- a/tests/runTests_MphysAeroOpt.py +++ b/tests/runTests_MphysAeroOpt.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/Wing") +os.chdir("./reg_test_files-main/Wing") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.incompressible 0") diff --git a/tests/runTests_MphysAeroProp.py b/tests/runTests_MphysAeroProp.py index 71982625..c56a0b60 100755 --- a/tests/runTests_MphysAeroProp.py +++ b/tests/runTests_MphysAeroProp.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeSnappyHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeSnappyHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_MphysAeroPropCoupled.py b/tests/runTests_MphysAeroPropCoupled.py index 50391522..78c4df9e 100755 --- a/tests/runTests_MphysAeroPropCoupled.py +++ b/tests/runTests_MphysAeroPropCoupled.py @@ -17,7 +17,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/WingProp") +os.chdir("./reg_test_files-main/WingProp") if gcomm.rank == 0: os.system("rm -rf */processor*") diff --git a/tests/runTests_MphysAeroStructOpt.py b/tests/runTests_MphysAeroStructOpt.py index 032e4c81..2de76968 100755 --- a/tests/runTests_MphysAeroStructOpt.py +++ b/tests/runTests_MphysAeroStructOpt.py @@ -19,7 +19,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/Wing") +os.chdir("./reg_test_files-main/Wing") if gcomm.rank == 0: os.system("rm -rf 0 processor*") os.system("cp -r 0.subsonic 0") diff --git a/tests/runTests_MphysAeroThermal.py b/tests/runTests_MphysAeroThermal.py index aada08f7..ae2248f1 100755 --- a/tests/runTests_MphysAeroThermal.py +++ b/tests/runTests_MphysAeroThermal.py @@ -18,7 +18,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/ChannelConjugateHeat") +os.chdir("./reg_test_files-main/ChannelConjugateHeat") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_MphysCheckPartials.py b/tests/runTests_MphysCheckPartials.py index cbdfd89d..dac00aef 100755 --- a/tests/runTests_MphysCheckPartials.py +++ b/tests/runTests_MphysCheckPartials.py @@ -14,7 +14,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_MphysCheckPartials1.py b/tests/runTests_MphysCheckPartials1.py index bc5507d3..fac01008 100755 --- a/tests/runTests_MphysCheckPartials1.py +++ b/tests/runTests_MphysCheckPartials1.py @@ -14,7 +14,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/CurvedCubeHexMesh") +os.chdir("./reg_test_files-main/CurvedCubeHexMesh") if gcomm.rank == 0: os.system("rm -rf 0 processor*") diff --git a/tests/runTests_Primal.py b/tests/runTests_Primal.py index e9f3b283..3f233e5e 100755 --- a/tests/runTests_Primal.py +++ b/tests/runTests_Primal.py @@ -10,7 +10,7 @@ gcomm = MPI.COMM_WORLD -os.chdir("./input/NACA0012") +os.chdir("./reg_test_files-main/NACA0012") if gcomm.rank == 0: os.system("rm -rf 0 processor*")