Re: [DuMux] Anisotropic heat conductivity tensor in heat conduction simulation

2022-09-12 Thread Timo Koch
Hi Helena,

you saw correctly that this is not implemented so far.

However, this is a relatively straight-forward modification of the 
EnergyVolumeVariables 
(https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/porousmediumflow/nonisothermal/volumevariables.hh)
since AFAIK, the flux implementation (Fourier’s law) already supports tensorial 
conductivities.

Steps:
(1) You would have to implement a custom VolumeVariables class, .e.g. 
MyOnePVolumeVariables,
which is essentially a copy OnePVolumeVariables only that inherits from a 
custom EnergyVolumeVariables class, e.g. MyEnergyVolumeVariables.
(2) You can then modify MyEnergyVolumeVariables (a copy EnergyVolumeVariables) 
such that it stores a conductivity Tensor instead of a Scalar and obtains the 
tensor values from the SpatialParams (where you implement a corresponding 
interface returning the tensor).
(3) You can then make Dumux use your custom class MyOnePVolumeVariables by 
setting it via the property system (specialise Property::VolumeVariables for 
your problem’s TypeTag).

Best wishes
Timo

On 12 Sep 2022, at 18:40, Helena Kschidock 
mailto:h.kschid...@gmail.com>> wrote:

Hi Bernd,

thanks a lot for your help, I am now able to set the conductivity locally this 
way.

I am still wondering if it is possible to set the 2x2 conductivity tensor 
somehow (also locally), to enable anisotropic upscaled conductivities? 
Something similar seems to exist for the permeability tensor, but looking at 
the handbook, I am getting the impression that this would require deeper 
modifications of the model used by DuMuX. If this is the case  then I might 
simply modify my selected example problem a bit. Or is it easily possible, 
could I e.g. overload the suggested `solidThermalConductivity` function with an 
non-Scalar (e.g. auto) type function instead?

Best regards,
Helena

On Wed, 7 Sept 2022 at 15:48, 
mailto:dumux-requ...@listserv.uni-stuttgart.de>>
 wrote:
Send DuMux mailing list submissions to
dumux@listserv.uni-stuttgart.de<mailto:dumux@listserv.uni-stuttgart.de>

To subscribe or unsubscribe via the World Wide Web, visit
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
or, via email, send a message with subject or body 'help' to

dumux-requ...@listserv.uni-stuttgart.de<mailto:dumux-requ...@listserv.uni-stuttgart.de>

You can reach the person managing the list at

dumux-ow...@listserv.uni-stuttgart.de<mailto:dumux-ow...@listserv.uni-stuttgart.de>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of DuMux digest..."


Today's Topics:

   1. Anisotropic heat conductivity tensor in heat conduction
  simulation (Helena Kschidock)
   2. Re: Anisotropic heat conductivity tensor in heat conduction
  simulation (Flemisch, Bernd)
   3. Re: Anisotropic heat conductivity tensor in heat conduction
  simulation (Flemisch, Bernd)


--

Message: 1
Date: Wed, 7 Sep 2022 14:51:08 +0200
From: Helena Kschidock mailto:h.kschid...@gmail.com>>
To: dumux@listserv.uni-stuttgart.de<mailto:dumux@listserv.uni-stuttgart.de>
Subject: [DuMux] Anisotropic heat conductivity tensor in heat
conduction simulation
Message-ID:

mailto:eeojh6...@mail.gmail.com>>
Content-Type: text/plain; charset="utf-8"

Hi all,

I am attempting to simulate a heat conduction problem in a simple porous
medium using macro-micro coupling via preCICE. Currently, I am implementing
the macro problem to be coupled with an existing micro problem, basing my
code on the existing implementation in dumux-heat (which solves a simple
heat conduction problem as a OnePNI problem with boundary and initial
conditions set in such a way that there is no flow, leaving only the heat
problem).

The micro problem communicates the porosity and a potentially anisotropic
thermal conductivity tensor as inputs to the macro problem. I now need to
incorporate these into my DuMuX macro simulation, and set them locally for
each subcontrolvolume.

>From what I have understood (and please correct me), this is pretty
straightforward for the porosity, and can be done by overloading
`template
Scalar porosity (const Element& element, const SubControlVolume& scv, const
ElementSolution& elemSol) const{}`
in spatialparams.hh.

However, I have not yet found any way to incorporate a local, scv-specific
conductivity, much less a local conductivity tensor in DuMux. The only
thing coming up seem to be the two parameters SolidThermalConductivity and
LiquidThermalConductivity, but these are static, even in my case. Any
suggestions on how to achieve this with DuMuX?

I'd be thankful for any and all ideas,
Best regards,
Helena Kschidock
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://listserv.uni-stuttgart.de/pipermail/dumux/attachments/2

Re: [DuMux] Anisotropic heat conductivity tensor in heat conduction simulation

2022-09-12 Thread Helena Kschidock
Hi Bernd,

thanks a lot for your help, I am now able to set the conductivity locally
this way.

I am still wondering if it is possible to set the 2x2 conductivity tensor
somehow (also locally), to enable anisotropic upscaled conductivities?
Something similar seems to exist for the permeability tensor, but looking
at the handbook, I am getting the impression that this would require deeper
modifications of the model used by DuMuX. If this is the case  then I might
simply modify my selected example problem a bit. Or is it easily possible,
could I e.g. overload the suggested `solidThermalConductivity` function
with an non-Scalar (e.g. auto) type function instead?

Best regards,
Helena

On Wed, 7 Sept 2022 at 15:48, 
wrote:

> Send DuMux mailing list submissions to
> dumux@listserv.uni-stuttgart.de
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
> or, via email, send a message with subject or body 'help' to
> dumux-requ...@listserv.uni-stuttgart.de
>
> You can reach the person managing the list at
> dumux-ow...@listserv.uni-stuttgart.de
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of DuMux digest..."
>
>
> Today's Topics:
>
>1. Anisotropic heat conductivity tensor in heat conduction
>   simulation (Helena Kschidock)
>2. Re: Anisotropic heat conductivity tensor in heat conduction
>   simulation (Flemisch, Bernd)
>3. Re: Anisotropic heat conductivity tensor in heat conduction
>   simulation (Flemisch, Bernd)
>
>
> --
>
> Message: 1
> Date: Wed, 7 Sep 2022 14:51:08 +0200
> From: Helena Kschidock 
> To: dumux@listserv.uni-stuttgart.de
> Subject: [DuMux] Anisotropic heat conductivity tensor in heat
> conduction simulation
> Message-ID:
>  eeojh6...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi all,
>
> I am attempting to simulate a heat conduction problem in a simple porous
> medium using macro-micro coupling via preCICE. Currently, I am implementing
> the macro problem to be coupled with an existing micro problem, basing my
> code on the existing implementation in dumux-heat (which solves a simple
> heat conduction problem as a OnePNI problem with boundary and initial
> conditions set in such a way that there is no flow, leaving only the heat
> problem).
>
> The micro problem communicates the porosity and a potentially anisotropic
> thermal conductivity tensor as inputs to the macro problem. I now need to
> incorporate these into my DuMuX macro simulation, and set them locally for
> each subcontrolvolume.
>
> >From what I have understood (and please correct me), this is pretty
> straightforward for the porosity, and can be done by overloading
> `template
> Scalar porosity (const Element& element, const SubControlVolume& scv, const
> ElementSolution& elemSol) const{}`
> in spatialparams.hh.
>
> However, I have not yet found any way to incorporate a local, scv-specific
> conductivity, much less a local conductivity tensor in DuMux. The only
> thing coming up seem to be the two parameters SolidThermalConductivity and
> LiquidThermalConductivity, but these are static, even in my case. Any
> suggestions on how to achieve this with DuMuX?
>
> I'd be thankful for any and all ideas,
> Best regards,
> Helena Kschidock
> -- next part --
> An HTML attachment was scrubbed...
> URL: <
> http://listserv.uni-stuttgart.de/pipermail/dumux/attachments/20220907/e844a949/attachment-0001.htm
> >
>
> --
>
> Message: 2
> Date: Wed, 7 Sep 2022 13:33:59 +
> From: "Flemisch, Bernd" 
> To: "dumux@listserv.uni-stuttgart.de"
> 
> Subject: Re: [DuMux] Anisotropic heat conductivity tensor in heat
> conduction simulation
> Message-ID: <3f3f55e5b16a45a2821a485402bdf...@iws.uni-stuttgart.de>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Helena,
>
>
> it should be possible to add a function
>
> solidThermalConductivity
> to your spatial params taking
> (element, scv, elemSol, solidState)
> as parameters. There is an example in the dumux-lecture module, have a
> look at
>
> https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-lecture/-/blob/master/lecture/mm/fuelcell/fuelcellspatialparams.hh
> .
> Return your upscaled conductivity there, ignoring the "solid" misnomer.
>
> Copy
>
> https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/material/fluidmatrixinteractions/1p

Re: [DuMux] Anisotropic heat conductivity tensor in heat conduction simulation

2022-09-07 Thread Flemisch, Bernd
Instead of what I said between "Copy" and "solidThermalConductivity()", you can 
simply copy

https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-lecture/-/blob/master/lecture/mm/fuelcell/material/thermalconductivityconstant.hh

to dumux-heat and use that in your properties.hh.


Kind regards

Bernd


--
_

Bernd Flemisch
IWS, Universität Stuttgart   phone: +49 711 685 69162
Pfaffenwaldring 61  email: be...@iws.uni-stuttgart.de
D-70569 Stuttgart   url: 
www.iws.uni-stuttgart.de/en/lh2/<http://www.iws.uni-stuttgart.de/en/lh2/>
_

Von: DuMux  im Auftrag von Flemisch, 
Bernd 
Gesendet: Mittwoch, 7. September 2022 15:33:59
An: dumux@listserv.uni-stuttgart.de
Betreff: Re: [DuMux] Anisotropic heat conductivity tensor in heat conduction 
simulation


Hi Helena,


it should be possible to add a function

solidThermalConductivity
to your spatial params taking
(element, scv, elemSol, solidState)
as parameters. There is an example in the dumux-lecture module, have a look at
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-lecture/-/blob/master/lecture/mm/fuelcell/fuelcellspatialparams.hh.
Return your upscaled conductivity there, ignoring the "solid" misnomer.

Copy
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh

to a new file upscaledconductivity.hh in dumux-heat.


Rename the class ThermalConductivityAverage to UpscaledConductivity and adapt 
the function effectiveThermalConductivity to just return

volVars.solidThermalConductivity()


Include the header upscaledconductivity.hh in your properties.hh and set the 
property by

struct ThermalConductivityModel { using type = 
UpscaledConductivity>; }
where MyTypeTag is the type tag of your problem.

Let me know if this helps.

Kind regards
Bernd



--
_

Bernd Flemisch
IWS, Universität Stuttgart   phone: +49 711 685 69162
Pfaffenwaldring 61  email: be...@iws.uni-stuttgart.de
D-70569 Stuttgart   url: 
www.iws.uni-stuttgart.de/en/lh2/<http://www.iws.uni-stuttgart.de/en/lh2/>
_

Von: DuMux  im Auftrag von Helena 
Kschidock 
Gesendet: Mittwoch, 7. September 2022 14:51:08
An: dumux@listserv.uni-stuttgart.de
Betreff: [DuMux] Anisotropic heat conductivity tensor in heat conduction 
simulation

Hi all,

I am attempting to simulate a heat conduction problem in a simple porous medium 
using macro-micro coupling via preCICE. Currently, I am implementing the macro 
problem to be coupled with an existing micro problem, basing my code on the 
existing implementation in dumux-heat (which solves a simple heat conduction 
problem as a OnePNI problem with boundary and initial conditions set in such a 
way that there is no flow, leaving only the heat problem).

The micro problem communicates the porosity and a potentially anisotropic 
thermal conductivity tensor as inputs to the macro problem. I now need to 
incorporate these into my DuMuX macro simulation, and set them locally for each 
subcontrolvolume.

>From what I have understood (and please correct me), this is pretty 
>straightforward for the porosity, and can be done by overloading
`template
Scalar porosity (const Element& element, const SubControlVolume& scv, const 
ElementSolution& elemSol) const{}`
in spatialparams.hh.

However, I have not yet found any way to incorporate a local, scv-specific 
conductivity, much less a local conductivity tensor in DuMux. The only thing 
coming up seem to be the two parameters SolidThermalConductivity and 
LiquidThermalConductivity, but these are static, even in my case. Any 
suggestions on how to achieve this with DuMuX?

I'd be thankful for any and all ideas,
Best regards,
Helena Kschidock

___
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux


Re: [DuMux] Anisotropic heat conductivity tensor in heat conduction simulation

2022-09-07 Thread Flemisch, Bernd
Hi Helena,


it should be possible to add a function

solidThermalConductivity
to your spatial params taking
(element, scv, elemSol, solidState)
as parameters. There is an example in the dumux-lecture module, have a look at
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-lecture/-/blob/master/lecture/mm/fuelcell/fuelcellspatialparams.hh.
Return your upscaled conductivity there, ignoring the "solid" misnomer.

Copy
https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh

to a new file upscaledconductivity.hh in dumux-heat.


Rename the class ThermalConductivityAverage to UpscaledConductivity and adapt 
the function effectiveThermalConductivity to just return

volVars.solidThermalConductivity()


Include the header upscaledconductivity.hh in your properties.hh and set the 
property by

struct ThermalConductivityModel { using type = 
UpscaledConductivity>; }
where MyTypeTag is the type tag of your problem.

Let me know if this helps.

Kind regards
Bernd



--
_

Bernd Flemisch
IWS, Universität Stuttgart   phone: +49 711 685 69162
Pfaffenwaldring 61  email: be...@iws.uni-stuttgart.de
D-70569 Stuttgart   url: 
www.iws.uni-stuttgart.de/en/lh2/<http://www.iws.uni-stuttgart.de/en/lh2/>
_

Von: DuMux  im Auftrag von Helena 
Kschidock 
Gesendet: Mittwoch, 7. September 2022 14:51:08
An: dumux@listserv.uni-stuttgart.de
Betreff: [DuMux] Anisotropic heat conductivity tensor in heat conduction 
simulation

Hi all,

I am attempting to simulate a heat conduction problem in a simple porous medium 
using macro-micro coupling via preCICE. Currently, I am implementing the macro 
problem to be coupled with an existing micro problem, basing my code on the 
existing implementation in dumux-heat (which solves a simple heat conduction 
problem as a OnePNI problem with boundary and initial conditions set in such a 
way that there is no flow, leaving only the heat problem).

The micro problem communicates the porosity and a potentially anisotropic 
thermal conductivity tensor as inputs to the macro problem. I now need to 
incorporate these into my DuMuX macro simulation, and set them locally for each 
subcontrolvolume.

>From what I have understood (and please correct me), this is pretty 
>straightforward for the porosity, and can be done by overloading
`template
Scalar porosity (const Element& element, const SubControlVolume& scv, const 
ElementSolution& elemSol) const{}`
in spatialparams.hh.

However, I have not yet found any way to incorporate a local, scv-specific 
conductivity, much less a local conductivity tensor in DuMux. The only thing 
coming up seem to be the two parameters SolidThermalConductivity and 
LiquidThermalConductivity, but these are static, even in my case. Any 
suggestions on how to achieve this with DuMuX?

I'd be thankful for any and all ideas,
Best regards,
Helena Kschidock

___
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux


[DuMux] Anisotropic heat conductivity tensor in heat conduction simulation

2022-09-07 Thread Helena Kschidock
Hi all,

I am attempting to simulate a heat conduction problem in a simple porous
medium using macro-micro coupling via preCICE. Currently, I am implementing
the macro problem to be coupled with an existing micro problem, basing my
code on the existing implementation in dumux-heat (which solves a simple
heat conduction problem as a OnePNI problem with boundary and initial
conditions set in such a way that there is no flow, leaving only the heat
problem).

The micro problem communicates the porosity and a potentially anisotropic
thermal conductivity tensor as inputs to the macro problem. I now need to
incorporate these into my DuMuX macro simulation, and set them locally for
each subcontrolvolume.

>From what I have understood (and please correct me), this is pretty
straightforward for the porosity, and can be done by overloading
`template
Scalar porosity (const Element& element, const SubControlVolume& scv, const
ElementSolution& elemSol) const{}`
in spatialparams.hh.

However, I have not yet found any way to incorporate a local, scv-specific
conductivity, much less a local conductivity tensor in DuMux. The only
thing coming up seem to be the two parameters SolidThermalConductivity and
LiquidThermalConductivity, but these are static, even in my case. Any
suggestions on how to achieve this with DuMuX?

I'd be thankful for any and all ideas,
Best regards,
Helena Kschidock
___
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux