mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -307,9 +307,7 @@ void Foam::MRFZone::addCoriolis
|
||||
vectorField& ddtUc = ddtU.internalField();
|
||||
const vectorField& Uc = U.internalField();
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
@ -331,9 +329,7 @@ void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) const
|
||||
vectorField& Usource = UEqn.source();
|
||||
const vectorField& U = UEqn.psi();
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
@ -359,9 +355,7 @@ void Foam::MRFZone::addCoriolis
|
||||
vectorField& Usource = UEqn.source();
|
||||
const vectorField& U = UEqn.psi();
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
@ -375,18 +369,14 @@ void Foam::MRFZone::relativeVelocity(volVectorField& U) const
|
||||
{
|
||||
const volVectorField& C = mesh_.C();
|
||||
|
||||
const vector& origin = origin_;
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
U[celli] -= (Omega ^ (C[celli] - origin));
|
||||
U[celli] -= (Omega ^ (C[celli] - origin_));
|
||||
}
|
||||
|
||||
// Included patches
|
||||
@ -407,7 +397,7 @@ void Foam::MRFZone::relativeVelocity(volVectorField& U) const
|
||||
label patchFacei = excludedFaces_[patchi][i];
|
||||
U.boundaryField()[patchi][patchFacei] -=
|
||||
(Omega
|
||||
^ (C.boundaryField()[patchi][patchFacei] - origin));
|
||||
^ (C.boundaryField()[patchi][patchFacei] - origin_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -417,18 +407,14 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
|
||||
{
|
||||
const volVectorField& C = mesh_.C();
|
||||
|
||||
const vector& origin = origin_;
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
const labelList& cells = mesh_.cellZones()[cellZoneID_];
|
||||
|
||||
forAll(cells, i)
|
||||
{
|
||||
label celli = cells[i];
|
||||
U[celli] += (Omega ^ (C[celli] - origin));
|
||||
U[celli] += (Omega ^ (C[celli] - origin_));
|
||||
}
|
||||
|
||||
// Included patches
|
||||
@ -438,7 +424,7 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
|
||||
{
|
||||
label patchFacei = includedFaces_[patchi][i];
|
||||
U.boundaryField()[patchi][patchFacei] =
|
||||
(Omega ^ (C.boundaryField()[patchi][patchFacei] - origin));
|
||||
(Omega ^ (C.boundaryField()[patchi][patchFacei] - origin_));
|
||||
}
|
||||
}
|
||||
|
||||
@ -449,7 +435,7 @@ void Foam::MRFZone::absoluteVelocity(volVectorField& U) const
|
||||
{
|
||||
label patchFacei = excludedFaces_[patchi][i];
|
||||
U.boundaryField()[patchi][patchFacei] +=
|
||||
(Omega ^ (C.boundaryField()[patchi][patchFacei] - origin));
|
||||
(Omega ^ (C.boundaryField()[patchi][patchFacei] - origin_));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -489,11 +475,7 @@ void Foam::MRFZone::absoluteFlux
|
||||
|
||||
void Foam::MRFZone::correctBoundaryVelocity(volVectorField& U) const
|
||||
{
|
||||
const vector& origin = origin_;
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
|
||||
// Included patches
|
||||
@ -507,7 +489,7 @@ void Foam::MRFZone::correctBoundaryVelocity(volVectorField& U) const
|
||||
{
|
||||
label patchFacei = includedFaces_[patchi][i];
|
||||
|
||||
pfld[patchFacei] = (Omega ^ (patchC[patchFacei] - origin));
|
||||
pfld[patchFacei] = (Omega ^ (patchC[patchFacei] - origin_));
|
||||
}
|
||||
|
||||
U.boundaryField()[patchi] == pfld;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -41,10 +41,7 @@ void Foam::MRFZone::relativeRhoFlux
|
||||
const surfaceVectorField& Cf = mesh_.Cf();
|
||||
const surfaceVectorField& Sf = mesh_.Sf();
|
||||
|
||||
const vector& origin = origin_;
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
const vectorField& Cfi = Cf.internalField();
|
||||
const vectorField& Sfi = Sf.internalField();
|
||||
@ -54,7 +51,7 @@ void Foam::MRFZone::relativeRhoFlux
|
||||
forAll(internalFaces_, i)
|
||||
{
|
||||
label facei = internalFaces_[i];
|
||||
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei];
|
||||
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
|
||||
}
|
||||
|
||||
// Included patches
|
||||
@ -77,7 +74,7 @@ void Foam::MRFZone::relativeRhoFlux
|
||||
|
||||
phi.boundaryField()[patchi][patchFacei] -=
|
||||
rho.boundaryField()[patchi][patchFacei]
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
|
||||
& Sf.boundaryField()[patchi][patchFacei];
|
||||
}
|
||||
}
|
||||
@ -94,10 +91,7 @@ void Foam::MRFZone::absoluteRhoFlux
|
||||
const surfaceVectorField& Cf = mesh_.Cf();
|
||||
const surfaceVectorField& Sf = mesh_.Sf();
|
||||
|
||||
const vector& origin = origin_;
|
||||
|
||||
const scalar t = mesh_.time().timeOutputValue();
|
||||
const vector& Omega = omega_->value(t)*axis_;
|
||||
const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_;
|
||||
|
||||
const vectorField& Cfi = Cf.internalField();
|
||||
const vectorField& Sfi = Sf.internalField();
|
||||
@ -107,7 +101,7 @@ void Foam::MRFZone::absoluteRhoFlux
|
||||
forAll(internalFaces_, i)
|
||||
{
|
||||
label facei = internalFaces_[i];
|
||||
phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei];
|
||||
phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei];
|
||||
}
|
||||
|
||||
// Included patches
|
||||
@ -119,7 +113,7 @@ void Foam::MRFZone::absoluteRhoFlux
|
||||
|
||||
phi.boundaryField()[patchi][patchFacei] +=
|
||||
rho.boundaryField()[patchi][patchFacei]
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
|
||||
& Sf.boundaryField()[patchi][patchFacei];
|
||||
}
|
||||
}
|
||||
@ -133,7 +127,7 @@ void Foam::MRFZone::absoluteRhoFlux
|
||||
|
||||
phi.boundaryField()[patchi][patchFacei] +=
|
||||
rho.boundaryField()[patchi][patchFacei]
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin))
|
||||
* (Omega ^ (Cf.boundaryField()[patchi][patchFacei] - origin_))
|
||||
& Sf.boundaryField()[patchi][patchFacei];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user