Hello Suzon,

I'm not sure if this is really where you are working, but assuming:

- the error you are working on is coming from the "evaluateInterfaceFluxes" 
function,

- in porousmediumsubproblem.hh header file,

- and you have added a call to evaluate the face-wise flux at somepoint that 
looks like this:


>

NumEqVector flux = 
couplingManager().couplingData().massCouplingCondition(element, fvGeometry, 
elemVolVars, scvf)
                                   * scvf.area() * 
elemVolVars[scvf.insideScvIdx()].extrusionFactor() * FluidSystem::molarMass(1) 
* -1.0 * 86400.0;
> (taken from the exercise solution)


Then there will be a compatibility problem between the call to the 
"massCouplingCondition(...)" function, and the type NumEqVector.


NumEqVector will have three entries (FieldVector<[...],3>, including the added 
temperature), and the returned vector from the massCouplingCondition(...) 
function will only have two entries (FieldVector<[...],2>, only evaluating the 
mass fluxes).

To fix this, you can use the correct type (for this I would recommend to simply 
use the auto type).

If this is not where your error is coming from, it would be very helpful if you 
could send us a bit more output from the compiler error. This is just a best 
guess based on the line number and error you have mentioned.

Best,
Ned

________________________________
From: DuMux <[email protected]> on behalf of Suzon Jammes 
<[email protected]>
Sent: Tuesday, April 2, 2024 4:01 PM
To: DuMux User Mailing List
Subject: Re: [DuMux] Non isothermal coupled exercise

Hi Christoph,

I was able to use non isothermal condition with another example using TwoPNCNI 
model so I guess that the problem comes from the coupling part.
I assume that indeed the temperature should be taken into at the coupling 
interface but I am not sure how to do that.
Should I modify something in the couplingManager ?
Thanks for your help,

—————————————————————————————
Suzon Jammes
Researcher & Consultant

M&U sas, Geology by Research
www.mandu-geology.fr
[email protected] / +33(0)768692934

[M&U LOGO-25.tif]


Ce message est confidentiel. Son contenu ne représente en aucun cas un 
engagement de la part de M&U SAS sous reserve de tout accord conclu par écrit 
avec la société. Toute publication, utilisation
ou diffusion, meme partielle, doit être autorisée préalablement. Si vous n'êtes 
pas destinataire de ce message, merci d'en avertir immédiatement l'expéditeur 
ou par email :[email protected].

This message is confidential. Its contents do not constitute a commitment by 
M&U SAS except
 where provided for in a written  agreement with the company. Any unauthorised 
disclosure, use
or dissemination, either whole or partial, is prohibited. If you are not the 
intended recipient, please notify the sender
immediately or with the following email: [email protected]



On 30 Mar 2024, at 16:23, Christoph Grüninger <[email protected]> wrote:

Hi Suzon,
I did not look into the code, so I might guess wrong.

I suspect that by adding temperature, you got a third primary variable. The 
error points out that you are using a vector with two entries (representing two 
primary variables) at a place where you should use a vector with three entries 
(for all three primary vars).

I hope this helps you figuring out what went wrong.

Bye
Christoph


Am 29.03.24 um 11:14 schrieb Suzon Jammes:
Hi all,
I am now working from the coupled exercise 
(exercises/exercise-coupling-ff-pm/models) with a 2pnc model. I wanted to make 
it non-isothermal so I change TwoPNC by TwoPNCNI and NavierStockesNC by 
NavierStockesNCNI in the properties file but I get the following error :
error: conversion from ‘FieldVector<[...],2>’ to non-scalar type 
‘FieldVector<[...],3>’ requested
  263 |  elemVolVars[scvf.insideScvIdx()].extrusionFactor() * 
FluidSystem::molarMass(1) * -1.0 * 86400.0;
I don't understand what does it mean. Does anybody know how to fix this problem 
?
Thank you
Suzon Jammes
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

--
L'enjeu est de bâtir la France de nos enfants,
pas de ressasser la France de notre enfance.
                      [Emmanuel Macron, 2022]
_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
DuMux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to