Skip to content

Commit 314012c

Browse files
committed
Make the test pass first.
1 parent 05388b0 commit 314012c

File tree

6 files changed

+5
-104
lines changed

6 files changed

+5
-104
lines changed

src/adjoint/DASolver/DAPimpleDyMFoam/DAPimpleDyMFoam.C

+3-8
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,11 @@ label DAPimpleDyMFoam::solvePrimal()
6767

6868
Foam::argList& args = argsPtr_();
6969
#include "createTime.H"
70-
//#include "createDynamicFvMesh.H"
71-
#include "createMesh.H"
72-
mesh.moving(true);
70+
#include "createDynamicFvMesh.H"
7371
#include "initContinuityErrs.H"
74-
//#include "createDyMControls.H"
75-
#include "myCreateDyMControls.H"
72+
#include "createDyMControls.H"
7673
#include "createFieldsPimpleDyM.H"
77-
//#include "createUfIfPresent.H"
78-
#include "myCreateUfIfPresent.H"
74+
#include "createUfIfPresent.H"
7975
#include "CourantNo.H"
8076
#include "setInitialDeltaT.H"
8177

@@ -118,7 +114,6 @@ label DAPimpleDyMFoam::solvePrimal()
118114
);
119115

120116
mesh.movePoints(readPoints);
121-
U.correctBoundaryConditions();
122117

123118
if (mesh.changing())
124119
{

src/adjoint/DASolver/DAPimpleDyMFoam/DAPimpleDyMFoam.H

+1-18
Original file line numberDiff line numberDiff line change
@@ -39,26 +39,9 @@
3939
#include "turbulentTransportModel.H"
4040
#include "pimpleControlDF.H"
4141
#include "pimpleControl.H"
42-
//#include "dynamicFvMesh.H"
42+
#include "dynamicFvMesh.H"
4343
#include "CorrectPhi.H"
4444

45-
void myCorrectUf
46-
(
47-
autoPtr<surfaceVectorField>& Uf,
48-
const volVectorField& U,
49-
const surfaceScalarField& phi
50-
)
51-
{
52-
const fvMesh& mesh = U.mesh();
53-
54-
if (mesh.moving())
55-
{
56-
Uf() = fvc::interpolate(U);
57-
surfaceVectorField n(mesh.Sf()/mesh.magSf());
58-
Uf() += n*(phi/mesh.magSf() - (n & Uf()));
59-
}
60-
}
61-
6245
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
6346

6447
namespace Foam

src/adjoint/DASolver/DAPimpleDyMFoam/myCreateDyMControls.H

-17
This file was deleted.

src/adjoint/DASolver/DAPimpleDyMFoam/myCreateUfIfPresent.H

-57
This file was deleted.

src/adjoint/DASolver/DAPimpleDyMFoam/pEqnPimpleDyM.H

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ U.correctBoundaryConditions();
5858
fvOptions.correct(U);
5959

6060
// Correct Uf if the mesh is moving
61-
//fvc::correctUf(Uf, U, phi);
62-
myCorrectUf(Uf, U, phi);
61+
fvc::correctUf(Uf, U, phi);
6362

6463
// Make the fluxes relative to the mesh motion
6564
fvc::makeRelative(phi, U);

tests/runUnitTests_DAPimpleDyMFoam.py

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
gcomm = MPI.COMM_WORLD
1313

1414
os.chdir("./reg_test_files-main/NACA0012DynamicMeshV4")
15-
if gcomm.rank == 0:
16-
os.system("rm -rf processor* *.bin")
1715

1816
# aero setup
1917
U0 = 10.0

0 commit comments

Comments
 (0)