waveSuperposition: Fixed bug in gas pressure

This commit is contained in:
Will Bainbridge
2018-12-06 18:18:36 +00:00
parent 2e1e8837c0
commit 4796ce32bd

View File

@ -347,7 +347,21 @@ Foam::tmp<Foam::scalarField> Foam::waveSuperposition::pGas
const vectorField& p
) const
{
return - pLiquid(t, p);
tensor axes;
scalar u;
vectorField xyz(p.size());
transformation(p, axes, u, xyz);
axes = tensor(- axes.x(), - axes.y(), axes.z());
if (heightAboveWave_)
{
xyz.replace(2, height(t, p));
}
xyz.replace(2, - xyz.component(2));
return pressure(t, xyz);
}