Commit a6fb0436 authored by mattijs's avatar mattijs
Browse files

BUG: fvMotionSolvers: fix dimensions. Fixes #765.

parent ac027daf
......@@ -240,7 +240,8 @@ void Foam::displacementComponentLaplacianFvMotionSolver::solve()
(
fvm::laplacian
(
diffusivityPtr_->operator()(),
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivityPtr_->operator()(),
cellDisplacement_,
"laplacian(diffusivity,cellDisplacement)"
)
......@@ -249,8 +250,8 @@ void Foam::displacementComponentLaplacianFvMotionSolver::solve()
);
fvOptions.constrain(TEqn);
TEqn.solveSegregatedOrCoupled(TEqn.solverDict());
fvOptions.correct(cellDisplacement_);
}
......
......@@ -138,7 +138,8 @@ void Foam::velocityComponentLaplacianFvMotionSolver::solve()
(
fvm::laplacian
(
diffusivityPtr_->operator()(),
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivityPtr_->operator()(),
cellMotionU_,
"laplacian(diffusivity,cellMotionU)"
)
......@@ -147,8 +148,8 @@ void Foam::velocityComponentLaplacianFvMotionSolver::solve()
);
fvOptions.constrain(TEqn);
TEqn.solveSegregatedOrCoupled(TEqn.solverDict());
fvOptions.correct(cellMotionU_);
}
......
......@@ -183,7 +183,11 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
diffusivityPtr_->correct();
pointDisplacement_.boundaryFieldRef().updateCoeffs();
surfaceScalarField Df(diffusivityPtr_->operator()());
const surfaceScalarField Df
(
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivityPtr_->operator()()
);
volTensorField gradCd("gradCd", fvc::grad(cellDisplacement_));
......@@ -241,8 +245,8 @@ void Foam::displacementSBRStressFvMotionSolver::solve()
);
fvOptions.constrain(TEqn);
TEqn.solveSegregatedOrCoupled(TEqn.solverDict());
fvOptions.correct(cellDisplacement_);
}
......
......@@ -342,7 +342,8 @@ void Foam::displacementLaplacianFvMotionSolver::solve()
(
fvm::laplacian
(
diffusivity().operator()(),
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivity().operator()(),
cellDisplacement_,
"laplacian(diffusivity,cellDisplacement)"
)
......@@ -351,8 +352,8 @@ void Foam::displacementLaplacianFvMotionSolver::solve()
);
fvOptions.constrain(TEqn);
TEqn.solveSegregatedOrCoupled(TEqn.solverDict());
fvOptions.correct(cellDisplacement_);
}
......
......@@ -351,7 +351,8 @@ void Foam::solidBodyDisplacementLaplacianFvMotionSolver::solve()
(
fvm::laplacian
(
diffusivity().operator()(),
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivity().operator()(),
cellDisplacement_,
"laplacian(diffusivity,cellDisplacement)"
)
......@@ -360,8 +361,8 @@ void Foam::solidBodyDisplacementLaplacianFvMotionSolver::solve()
);
fvOptions.constrain(TEqn);
TEqn.solveSegregatedOrCoupled(TEqn.solverDict());
fvOptions.correct(cellDisplacement_);
}
......
......@@ -381,7 +381,12 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
sigmaD_ = magNewSigmaD;
}
const surfaceScalarField Df(diffusivity().operator()());
const surfaceScalarField Df
(
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivity().operator()()
);
pointDisplacement_.boundaryFieldRef().updateCoeffs();
fv::options& fvOptions(fv::options::New(fvMesh_));
......@@ -417,6 +422,8 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
// Note: solve uncoupled
DEqn.solveSegregatedOrCoupled(DEqn.solverDict());
fvOptions.correct(cellDisp);
}
}
......
......@@ -131,7 +131,8 @@ void Foam::velocityLaplacianFvMotionSolver::solve()
(
fvm::laplacian
(
diffusivityPtr_->operator()(),
dimensionedScalar("viscosity", dimViscosity, 1.0)
*diffusivityPtr_->operator()(),
cellMotionU_,
"laplacian(diffusivity,cellMotionU)"
)
......@@ -140,8 +141,8 @@ void Foam::velocityLaplacianFvMotionSolver::solve()
);
fvOptions.constrain(UEqn);
UEqn.solveSegregatedOrCoupled(UEqn.solverDict());
fvOptions.correct(cellMotionU_);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment