From 85d1a92cf21135d249d6f9335e80e67923c74f1c Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 5 Sep 2011 19:21:53 +0100 Subject: [PATCH] Corrected formatting --- ...phaseFixedFluxPressureFvPatchScalarField.C | 20 +++++++--- ...phaseFixedFluxPressureFvPatchScalarField.H | 4 +- .../multiphaseSystem/multiphaseSystem.C | 3 +- .../multiphaseSystem/multiphaseSystem.H | 6 ++- .../multiphase/multiphaseEulerFoam/pEqn.H | 40 ++++++++++++++----- .../phaseModel/phaseModel/phaseModel.H | 5 ++- .../SRFFreestreamVelocityFvPatchVectorField.C | 8 ++-- ...phaseFixedFluxPressureFvPatchScalarField.C | 20 +++++++--- ...phaseFixedFluxPressureFvPatchScalarField.H | 4 +- 9 files changed, 78 insertions(+), 32 deletions(-) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C index 503cfd9e70..be534fb8fa 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C @@ -31,7 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -44,7 +45,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& ptf, const fvPatch& p, @@ -59,7 +61,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -85,7 +88,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure } -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf ) @@ -97,7 +101,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf, const DimensionedField& iF @@ -145,7 +150,10 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs() } -void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write(Ostream& os) const +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write +( + Ostream& os +) const { fvPatchScalarField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H index a647681564..b97001a5c0 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H @@ -88,8 +88,8 @@ public: const dictionary& ); - //- Construct by mapping given multiphaseFixedFluxPressureFvPatchScalarField onto - // a new patch + //- Construct by mapping given + // multiphaseFixedFluxPressureFvPatchScalarField onto a new patch multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField&, diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index a215300501..f5684a4a68 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -96,7 +96,8 @@ void Foam::multiphaseSystem::solveAlphas() surfaceScalarField phir ( (phase1.phi() - phase2.phi()) - + min(cAlpha(phase1, phase2)*phic, max(phic))*nHatf(phase1, phase2) + + min(cAlpha(phase1, phase2)*phic, max(phic)) + *nHatf(phase1, phase2) ); phiAlphaCorr += fvc::flux diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H index 4f951565a5..408fdcdafa 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H @@ -233,7 +233,11 @@ private: surfaceVectorField::GeometricBoundaryField& nHatb ) const; - tmp K(const phaseModel& alpha1, const phaseModel& alpha2) const; + tmp K + ( + const phaseModel& alpha1, + const phaseModel& alpha2 + ) const; public: diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index a9c5dc2ed5..9d6afa593e 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -62,8 +62,10 @@ mrfZones.relativeFlux(phase.phi()); phase.phi() += rAlphaAUfs[phasei]*(g & mesh.Sf()); - multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin(); - multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin(); + multiphaseSystem::dragModelTable::const_iterator dmIter = + fluid.dragModels().begin(); + multiphaseSystem::dragCoeffFields::const_iterator dcIter = + dragCoeffs().begin(); for ( ; @@ -84,15 +86,23 @@ if ( - (&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2()) - || (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1()) + ( + &phase == &dmIter()->phase1() + && &phase2 == &dmIter()->phase2() + ) + || ( + &phase == &dmIter()->phase2() + && &phase2 == &dmIter()->phase1() + ) ) break; phasej++; } phase.phi() += - fvc::interpolate((1.0/phase.rho())*rAUs[phasei]*(*dcIter()))*phi0s[phasej]; + fvc::interpolate + ((1.0/phase.rho())*rAUs[phasei]*(*dcIter())) + *phi0s[phasej]; } } @@ -182,8 +192,10 @@ + rAlphaAUfs[phasei]*mSfGradp/phase.rho() ); - multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin(); - multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin(); + multiphaseSystem::dragModelTable::const_iterator dmIter = + fluid.dragModels().begin(); + multiphaseSystem::dragCoeffFields::const_iterator dcIter = + dragCoeffs().begin(); for ( ; @@ -204,14 +216,22 @@ if ( - (&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2()) - || (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1()) + ( + &phase == &dmIter()->phase1() + && &phase2 == &dmIter()->phase2() + ) + || ( + &phase == &dmIter()->phase2() + && &phase2 == &dmIter()->phase1() + ) ) break; phasej++; } - phase.U() += (1.0/phase.rho())*rAUs[phasei]*(*dcIter())*U0s[phasej]; + phase.U() += + (1.0/phase.rho()) + *rAUs[phasei]*(*dcIter())*U0s[phasej]; } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H index 9939eedb67..cd50760aff 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H @@ -122,7 +122,10 @@ public: autoPtr operator()(Istream& is) const { dictionaryEntry ent(dictionary::null, is); - return autoPtr(new phaseModel(ent.keyword(), ent, mesh_)); + return autoPtr + ( + new phaseModel(ent.keyword(), ent, mesh_) + ); } }; diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C index d78bfc41a5..8d4f93ad1a 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFFreestreamVelocityFvPatchVectorField/SRFFreestreamVelocityFvPatchVectorField.C @@ -113,13 +113,15 @@ void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs() scalar theta = time*mag(srf.omega().value()); refValue() = - cos(theta)*UInf_ + sin(theta)*(srf.axis() ^ UInf_) + //cos(theta)*UInf_ + sin(theta)*(srf.axis() ^ UInf_) + UInf_ - srf.velocity(patch().Cf()); // Set the inlet-outlet choice based on the direction of the freestream - valueFraction() = 1.0 - pos(refValue() & patch().Sf()); + //valueFraction() = 1.0 - pos(refValue() & patch().Sf()); - mixedFvPatchField::updateCoeffs(); + //mixedFvPatchField::updateCoeffs(); + inletOutletFvPatchVectorField::updateCoeffs(); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C index 503cfd9e70..be534fb8fa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C @@ -31,7 +31,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -44,7 +45,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& ptf, const fvPatch& p, @@ -59,7 +61,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -85,7 +88,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure } -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf ) @@ -97,7 +101,8 @@ Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressure {} -Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +Foam::multiphaseFixedFluxPressureFvPatchScalarField:: +multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf, const DimensionedField& iF @@ -145,7 +150,10 @@ void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs() } -void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write(Ostream& os) const +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write +( + Ostream& os +) const { fvPatchScalarField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H index a647681564..b97001a5c0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H @@ -88,8 +88,8 @@ public: const dictionary& ); - //- Construct by mapping given multiphaseFixedFluxPressureFvPatchScalarField onto - // a new patch + //- Construct by mapping given + // multiphaseFixedFluxPressureFvPatchScalarField onto a new patch multiphaseFixedFluxPressureFvPatchScalarField ( const multiphaseFixedFluxPressureFvPatchScalarField&,