Hi,
i try to change the boundary conditions in tutorial_coupled problem. The
domain is 600m*600m, and the boundary conditions are:

if x=580m and y=580m: S_n=1 and P_w=350 bar
if x=20m and y=20m:    S_n=0, q_w . n = -1.e-8 and q_n.n=0
and nos flux in the rest of domain.
So, i try to do like in decoupled problem, and i write:



void boundaryTypes(BoundaryTypes &bcTypes, const Vertex &vertex) const
    {
        const GlobalPosition &globalPos = vertex.geometry().center();
        if (globalPos[0] > 580-eps_ && globalPos[1] > 580-eps_)   //
           bcTypes.setAllDirichlet();

        if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_)
          {
           bcTypes.setDirichlet(Indices::snIdx);
           bcTypes.setNeumann(Indices::contiWEqIdx);
            bcTypes.setNeumann(Indices::contiNEqIdx);
          }

        else // neuman for the remaining boundaries
           bcTypes.setAllNeumann();

    }

    //! Evaluates the Dirichlet boundary conditions for a finite volume
    //! on the grid boundary. Here, the 'values' parameter stores
    //! primary variables.
    void dirichletAtPos(PrimaryVariables &values, const GlobalPosition&
globalPos) const
    {
      if (globalPos[0] > 580-eps_ && globalPos[1] > 580-eps_ )
       {
        values[Indices::pwIdx] = 1.5e7; // 1 bar = e5 Pa
        values[Indices::snIdx] = 1.0; // 0 % oil saturation on left
boundary
       }
      else if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_ )
        {
        //values[Indices::pwIdx] = 3.5e7; // 1 bar = e5 Pa
        values[Indices::snIdx] = 0.0; // 0 % oil saturation on left
boundary
        }
    }

    //! Evaluates the boundary conditions for a Neumann boundary
    //! segment. Here, the 'values' parameter stores the mass flux in
    //! [kg/(m^2 * s)] in normal direction of each phase. Negative
    //! values mean influx.
    void neumann(PrimaryVariables &values,
                 const Element &element,
                 const FVElementGeometry &fvGeometry,
                 const Intersection &intersection,
                 int scvIdx,
                 int boundaryFaceIdx) const
    {
        const GlobalPosition &globalPos =
            fvGeometry.boundaryFace[boundaryFaceIdx].ipGlobal;


        if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_ )
            {
             values[Indices::contiWEqIdx] = -1.e-8;
             values[Indices::contiNEqIdx] = 0.0;
             }
            // no-flow on the remaining Neumann-boundaries.
           else
           {
            values[Indices::contiWEqIdx] = 0.0;
            values[Indices::contiNEqIdx] = 0.0;
           }

    }

but in execution, i have the output file joint to this mail. Please,how we
can implement these boundary conditions in a coupled problem?
Thank you for the help.
Kind regards.

2015-10-16 23:15 GMT+02:00 Ait Mahiout Latifa <[email protected]>:

> Hi, is it possible to implement boundary like this:
> for example, we have and domain 600m*600m, and we have impos the boundary
> contitions:
> if x =20m and y=20m: Sn=0.0 and q_w . n = -e-8, and q_n.n = 0
>
> The method used in decoupled problem to implement in the same times
> Dirichlet and Neumann conditions not walk in tutorial_coupled problem. So
> is it possible to implement in the same times Dirichlet avec Neumann
> conditions in an part of an domain, in tutorial_coupled problem?
>  Thak's for the hel.
>

Attachment: output
Description: Binary data

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

Reply via email to