|
[Sponsors] |
October 16, 2023, 04:50 |
Why A() is a scalarField ?
|
#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 |
|
October 18, 2023, 06:02 |
Just a convenient note
|
#2 |
New Member
ZP zhao
Join Date: Oct 2023
Location: China
Posts: 7
Rep Power: 3 |
||
October 18, 2023, 10:59 |
|
#3 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
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 12:01. |
|
October 18, 2023, 12:07 |
|
#4 | |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 737
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bizarre behavior of passing a scalarField to another scalarField | randolph | OpenFOAM | 0 | October 24, 2020 20:08 |
Interpolating scalarField values between two non conformal patches | goku15 | OpenFOAM Running, Solving & CFD | 3 | May 31, 2019 13:17 |
char combustion chemistry; multi-step raection, coalChemistryFoam | Shuai_W | OpenFOAM Running, Solving & CFD | 3 | February 18, 2019 07:32 |
Divergence of a scalarField in two forms | RaghavendraRohith | OpenFOAM Programming & Development | 1 | August 23, 2016 11:34 |
How to calculate T+gradT where T is volScalarField and gradT is scalarField ??? | Zhiheng Wang | OpenFOAM Programming & Development | 4 | May 28, 2016 14:51 |