Hi Nikolai,

I have to agree with Martin that modifying Darcy's law is not a good idea. Your 
setup is problem dependent but you mess with the general implementation. One 
solution, as Martin said, is to use the neumann() function which can also 
depend on unknowns in the domain and compute the flux there. Another solution 
might be, as I suggested earlier, to add an extra cell layer with different 
material law (modelling a non-porous domain with big porosity and permeability 
and pc=0). 

Best wishes
Timo

> Am 24.08.2018 um 14:19 schrieb Martin Schneider 
> <[email protected]>:
> 
> Hi Nikolai,
> 
> maybe the easiest way is to also implement an priVarFormulation() function
> in your TwoP volVars, as it is for example done for the 2p2c volVars. 
> 
> Then you can access the formulation using 
> ElementVolumeVariables::VolumeVariables::priVarFormulation()
> in your darcyslaw.
> 
> I guess this is related to the previous discussion where you mentioned that 
> you had to change 
> darcyslaw as follows:
> 
>             if (!scvf.boundary()) {
> 
>                 // Inside the domain calculate the phase flux using phase 
> pressures (with pn = pw + pc)
>                 pInside = insideVolVars.pressure(phaseIdx);
>                 pOutside = outsideVolVars.pressure(phaseIdx);
>             }
>             else {
>                 // Do not include the contributions from capillary forces for 
> boundary fluxes
>                 //static_assert( (VolumeVariables::priVarFormulation() == 
> TwoPFormulation::p0s1), "darcyslaw.hh: BC implemented for p0s1           
> formulation only!");       // uncommenting this yields an error
>                 // WARNING: implemented for p1s0 formulation only!
>                 pInside = insideVolVars.pressure(1);
>                 pOutside = outsideVolVars.pressure(1);
>             }
> 
> Which means that you do not want to have a capillary flux over your domain 
> boundary. 
> I think the easier alternative would be to use a solution-dependent Neumann 
> condition in your problem
> 
>     NumEqVector neumann(const Element& element,
>                         const FVElementGeometry&         fvGeometry,
>                         const ElementVolumeVariables& elemVolVars,
>                         const SubControlVolumeFace& scvf) const
> 
> where you can get the nonwetting phase pressure of the boundary cell via the 
> elemVolVars,  
> and the fluxes can then be calculated in this function similar to darcyslaw 
> but now you can specify 
> that pc=0 for your boundary fluxes (i.e. pw = pn). 
> 
> Kind regards,
> Martin
> 
>> On 08/24/2018 09:34 AM, Nikolai Andrianov wrote:
>> Hi Martin,
>> 
>> 
>> I would like to know from within 
>> dumux/discretization/cellcentered/tpfa/darcyslaw.hh if TwoPFormulation::p0s1 
>> or TwoPFormulation::p1s0 is used.
>> 
>> 
>> Thanks,
>> 
>> Nikolai
>> From: Martin Schneider <[email protected]>
>> Sent: Thursday, August 23, 2018 4:26:20 PM
>> To: DuMuX User Forum; Nikolai Andrianov
>> Subject: Re: [DuMuX] Formulation used in darcyslaw.hh
>>  
>> Dear Nikolai,
>> 
>> could you please specify what you mean with "formulation". 
>> Do you mean which implementation of CCTpfaDarcysLaw?
>> 
>> Thanks,
>> Martin
>> 
>>> On 08/23/2018 03:39 PM, Nikolai Andrianov wrote:
>>> Dear DuMuX experts,
>>> 
>>> 
>>> Please advise how can I identify, which formulation is used in 
>>> dumux/discretization/cellcentered/tpfa/darcyslaw.hh.
>>> 
>>> 
>>> Thanks,
>>> 
>>> Nikolai
>>> 
>>> 
>>> _______________________________________________
>>> Dumux mailing list
>>> [email protected]
>>> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
>> 
>> -- 
>> M.Sc. Martin Schneider
>> University of Stuttgart         
>> Institute for Modelling Hydraulic and Environmental Systems
>> Department of Hydromechanics and Modelling of Hydrosystems
>> Pfaffenwaldring 61
>> D-70569 Stuttgart
>> Tel: (+49) 0711/ 685-69159
>> Fax: (+49) 0711/ 685-60430
>> E-Mail: [email protected]
> 
> -- 
> M.Sc. Martin Schneider
> University of Stuttgart         
> Institute for Modelling Hydraulic and Environmental Systems
> Department of Hydromechanics and Modelling of Hydrosystems
> Pfaffenwaldring 61
> D-70569 Stuttgart
> Tel: (+49) 0711/ 685-69159
> Fax: (+49) 0711/ 685-60430
> E-Mail: [email protected]
> _______________________________________________
> 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