diff --git a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.C index 81897565c..915c5efa0 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, inletOutlet_); } diff --git a/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H b/src/waves/derivedFvPatchFields/waveAlpha/waveAlphaFvPatchScalarField.H index c97b49547..049804d64 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: