Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,10 +58,11 @@ void Foam::fvTotalSource::addSource(fvMatrix<scalar>& eqn) const
|
|||||||
eqn.dimensions() = S.dimensions();
|
eqn.dimensions() = S.dimensions();
|
||||||
|
|
||||||
// Apply the source
|
// Apply the source
|
||||||
|
scalarField& eqnSource = eqn.source();
|
||||||
forAll(cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
const scalar f = mesh().V()[cells[i]]/V;
|
const scalar f = mesh().V()[cells[i]]/V;
|
||||||
eqn.source()[cells[i]] -= f*S.value();
|
eqnSource[cells[i]] -= f*S.value();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,11 +60,13 @@ void Foam::fvTotalSource::addSupType
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Apply the source
|
// Apply the source
|
||||||
|
Field<Type>& eqnSource = eqn.source();
|
||||||
|
scalarField& eqnDiag = eqn.diag();
|
||||||
forAll(cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
const scalar f = mesh().V()[cells[i]]/V;
|
const scalar f = mesh().V()[cells[i]]/V;
|
||||||
eqn.source()[cells[i]] -= f*S.value()*sourceCoeff[i];
|
eqnSource[cells[i]] -= f*S.value()*sourceCoeff[i];
|
||||||
eqn.diag()[cells[i]] += f*S.value()*internalCoeff[i];
|
eqnDiag[cells[i]] += f*S.value()*internalCoeff[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -76,10 +78,11 @@ void Foam::fvTotalSource::addSupType
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Apply the source
|
// Apply the source
|
||||||
|
Field<Type>& eqnSource = eqn.source();
|
||||||
forAll(cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
const scalar f = mesh().V()[cells[i]]/V;
|
const scalar f = mesh().V()[cells[i]]/V;
|
||||||
eqn.source()[cells[i]] -= f*S.value()*value[i];
|
eqnSource[cells[i]] -= f*S.value()*value[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,10 +77,10 @@ void Foam::fv::acceleration::add
|
|||||||
|
|
||||||
const labelUList cells = set_.cells();
|
const labelUList cells = set_.cells();
|
||||||
|
|
||||||
|
vectorField& eqnSource = eqn.source();
|
||||||
forAll(cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
const label celli = cells[i];
|
eqnSource[cells[i]] -= V[cells[i]]*alphaRho[cells[i]]*a;
|
||||||
eqn.source()[celli] -= V[celli]*alphaRho[celli]*a;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -132,9 +132,10 @@ void Foam::fv::heatSource::addSup
|
|||||||
const scalar t = mesh().time().userTimeValue();
|
const scalar t = mesh().time().userTimeValue();
|
||||||
const scalar q = q_->value(t);
|
const scalar q = q_->value(t);
|
||||||
|
|
||||||
|
scalarField& eqnSource = eqn.source();
|
||||||
forAll(cells, i)
|
forAll(cells, i)
|
||||||
{
|
{
|
||||||
eqn.source()[cells[i]] -= mesh().V()[cells[i]]*q;
|
eqnSource[cells[i]] -= mesh().V()[cells[i]]*q;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user