diff --git a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C index 8f0b6143e5..f9525e4236 100644 --- a/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C +++ b/src/rigidBodyDynamics/restraints/linearAxialAngularSpring/linearAxialAngularSpring.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,7 +133,7 @@ void Foam::RBD::restraints::linearAxialAngularSpring::restrain } // Accumulate the force for the restrained body - fx[bodyIndex_] += spatialVector(moment, Zero); + fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(moment, Zero); } diff --git a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C index d3e4e063da..da58d2fcc5 100644 --- a/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C +++ b/src/rigidBodyDynamics/restraints/linearDamper/linearDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ void Foam::RBD::restraints::linearDamper::restrain } // Accumulate the force for the restrained body - fx[bodyIndex_] += spatialVector(Zero, force); + fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(Zero, force); } diff --git a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C index 8ef17486b7..5cec794d04 100644 --- a/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C +++ b/src/rigidBodyDynamics/restraints/sphericalAngularDamper/sphericalAngularDamper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ void Foam::RBD::restraints::sphericalAngularDamper::restrain } // Accumulate the force for the restrained body - fx[bodyIndex_] += spatialVector(moment, Zero); + fx[bodyIndex_] += model_.X0(bodyID_).T() & spatialVector(moment, Zero); } diff --git a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C index 81897565ce..1c240eb6a8 100644 --- a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C +++ b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C @@ -58,8 +58,8 @@ Foam::waveAlphaFvPatchScalarField::waveAlphaFvPatchScalarField : mixedFvPatchScalarField(p, iF), UName_(dict.lookupOrDefault("U", "U")), - liquid_(dict.lookupOrDefault("liquid", true)), - inletOutlet_(dict.lookupOrDefault("inletOutlet", true)) + liquid_(dict.lookupOrDefault("liquid", true)), + inletOutlet_(dict.lookupOrDefault("inletOutlet", true)) { if (dict.found("value")) { @@ -171,7 +171,8 @@ void Foam::waveAlphaFvPatchScalarField::write { mixedFvPatchScalarField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); - writeEntryIfDifferent(os, "inletOutlet", true, inletOutlet_); + writeEntryIfDifferent(os, "inletOutlet", true, inletOutlet_); + writeEntryIfDifferent(os, "liquid", true, liquid_); } diff --git a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H index c97b495475..049804d649 100644 --- a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H +++ b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H @@ -79,14 +79,14 @@ class waveAlphaFvPatchScalarField word UName_; //- Is this alpha field that of the liquid under the wave? - const bool liquid_; + const Switch liquid_; //- Act as an inlet/outlet patch? If false, the alpha field will be set // by the wave model even during outflow. This may apply the wave model // more accurately, but it might also be unstable. If true, the alpha // boundary condition will be zero gradient when the flow reverses, as // is usual. - const bool inletOutlet_; + const Switch inletOutlet_; public: