|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Mar 2020
Posts: 11
Rep Power: 6 ![]() |
Hello all,
looking at the fvMatrix class (but you also see it in all the incompressible solvers), I noticed that the A() method return a volScalarField, while the H() a volumetric field based on the type. I would have expected a field base on type also for the A(), or the matrix diagonal for every component. Since I am wrong, could someone explain it to me ? Thank you |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
ZP zhao
Join Date: Oct 2023
Location: China
Posts: 7
Rep Power: 2 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
Just to add to this response, look at the fvMatrix code and you will see that A() just returns the matrix diagonal coefficients (dimensionless) divided by the cell volume. Hence, this is always a volScalar. By contrast, the dimensions of H() are the same as the dimensions of the matrix source term, and so depend on the matrix equation that is being solved - the post above shows one example where it has the dimensions of a volVectorField, but it could be anything.
Last edited by Tobermory; October 18, 2023 at 11:01. |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 711
Rep Power: 14 ![]() |
Quote:
![]() where Q is the source term. Now define H as the sum of the source term minus the off-diagonal terms of MU, then ![]() where AU contains the remaining diagonal terms from MU. Using this terminology, you should be able to follow through the coding in the pEqn more easily. |
||
![]() |
![]() |
![]() |
Tags |
finite volume method, opefoam, programing |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bizarre behavior of passing a scalarField to another scalarField | randolph | OpenFOAM | 0 | October 24, 2020 19:08 |
Interpolating scalarField values between two non conformal patches | goku15 | OpenFOAM Running, Solving & CFD | 3 | May 31, 2019 12:17 |
char combustion chemistry; multi-step raection, coalChemistryFoam | Shuai_W | OpenFOAM Running, Solving & CFD | 3 | February 18, 2019 06:32 |
Divergence of a scalarField in two forms | RaghavendraRohith | OpenFOAM Programming & Development | 1 | August 23, 2016 10:34 |
How to calculate T+gradT where T is volScalarField and gradT is scalarField ??? | Zhiheng Wang | OpenFOAM Programming & Development | 4 | May 28, 2016 13:51 |