[bugfix]: recover velocity field in a more general way.
avoiding compilation failure in e.g. waves2Foam
This commit is contained in:
parent
be47d0ece1
commit
c429f3b275
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ else
|
|||
|
||||
const scalar deltaX = Foam::cbrt(mesh.V()[0]);
|
||||
|
||||
velMag = mag(U[0]);
|
||||
// recover velocity field in a more general way
|
||||
const volVectorField& URef
|
||||
= mesh.db().lookupObject<const volVectorField>("U");
|
||||
|
||||
velMag = mag(URef[0]);
|
||||
|
||||
CoNum = velMag*deltaT/deltaX;
|
||||
|
||||
|
|
Reference in a new issue