|
[Sponsors] |
How to multiply volScalarField and fvScalarMatrix ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 30, 2020, 12:17 |
How to multiply volScalarField and fvScalarMatrix ?
|
#1 | |||
Member
Paul Palladium
Join Date: Jan 2016
Posts: 94
Rep Power: 10 |
Dear Foamers,
I am interested in multiplying or dividing a fvScalarMatrix by a volScalarField. In a case of a fvc operator like fvc::div or fvc::laplacian the code compiles. For example : Quote:
Quote:
Unfortunately when it comes to implicit operator (fvm) the code doesn't compile : Quote:
How can we solve this issue ? Am I asking something unrealistic ? In a pure mathematical way it makes sense. But OpenFOAM doesn't seem to like it. All help would absolutely be helpful. F Last edited by Fauster; December 3, 2020 at 04:08. Reason: Modification due to Onurb comment |
||||
December 1, 2020, 14:10 |
|
#2 |
New Member
Bruno
Join Date: Jul 2018
Posts: 6
Rep Power: 8 |
Hello Fauster,
laplacian is misspelled. |
|
December 2, 2020, 05:57 |
|
#3 | |
Member
Paul Palladium
Join Date: Jan 2016
Posts: 94
Rep Power: 10 |
Sorry Onurb. I made a mistake when writing the text but in the code this is
Quote:
I can copy paste the message error at compilation but for me it's like this is not authorized by OpenFOAM. For example if you try to do something like fvc::interpolate(surfaceScalarField). Last edited by Fauster; December 3, 2020 at 04:07. |
||
December 14, 2022, 12:29 |
|
#4 |
New Member
Corbin G
Join Date: Oct 2022
Location: Midwest, USA
Posts: 11
Rep Power: 4 |
Dear Fauster,
I had same problem as you. It seems if you switch the order of multiplication, it works OK. That is volScalarField*fvScalarMatrix IS possible. But, fvScalarMatrix*volScalarField gives compilation error: Code:
volScalarField rhoCp1 = rho1*alpha1*mixture.thermo1().Cp() + rho2*alpha2*mixture.thermo2().Cp(); fvScalarMatrix eEqn ( rhoCp1*fvm::ddt(T) // compiles OK! //fvm::ddt(T)*rhoCp1 // gives compilation error! == fvOptions(rhoCp1, T) ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No matching function error: Phase change source term added to interMixingFoam | wavefunction | OpenFOAM Programming & Development | 2 | February 4, 2022 08:46 |
Source term in fvScalarMatrix | vivek05 | OpenFOAM Programming & Development | 2 | June 6, 2019 08:30 |
fvMatrix to volScalarField coversion ? | lfgmarc | OpenFOAM Programming & Development | 3 | March 21, 2019 07:32 |
Error message | Bruno_Jorge | Main CFD Forum | 1 | February 5, 2019 12:12 |
namespace Foam | Argen | OpenFOAM | 4 | February 5, 2019 09:55 |