On Tue, Nov 11, 2014 at 8:52 AM, Gaaß, Markus <markus.ga...@zae-bayern.de>
wrote:

> Hi!
>
> I made some progress with the advection problem.
>
> However, I am pretty
>
>  sure I didn't understand the formulation of boundary conditions correctly.
>
> Being new to FVM, I first had to realize that there is a distinction
> between the values of a cell variable ("sitting at the cell center") and
> the values of the faces confining the cells.
> I got that the face value between two cells is the arithmetic mean of the
> values of the adjacent cells.
> How is the situation at the boundary of the domain?


For a fixed value boundary condition the value at the face is whatever is
set. There is no need to interpolate the value to the face and FiPy doesn't
do any special interpolation to the exterior faces.


> I have the impression that the face value is the same as the cell value
> there.
> However, constraining the face value for "facesLeft" isn't reflected onto
> the first cell value.
>

There is obviously some sort of problem.


> In my case I am starting with an initial state where the system is in
> equilibrium and am interested in its evolution upon a disturbance or
> excitation on the left boundary.
>
> So I have the porous material and the air 'above' it at the same
> temperature and at a partial vapor pressure that results from those
> temperatures. Now I increase the temperature and partial pressure on the
> left boundary and have the heat and the water vapor advected along the
> system. I have tried this by setting the boundary conditions for the four
> variables as
>
> X_G_in = 0.01294      # water content of incoming air, corresponds to
> dewpoint of 18°C
> X_S_in = 0.3484       # eq. water content of sorbent under carrier gas
> with given parameters
> T_G_in = 20. + 273.15 # temperature of incoming carrier gas
> T_S_in = T_G_in       # temperature of sorbent at entrance is equal to
> carrier gas temperature
>                       # (use ramp when values T_S_init and T_G_in differ a
> lot)
>
> u1.constrain(X_G_in, mesh.facesLeft)
> u2.constrain(X_S_in, mesh.facesLeft)
> u3.constrain(T_G_in, mesh.facesLeft)
> u4.constrain(T_S_in, mesh.facesLeft)
>
> This of course sets only the face values and doesn't change the value of
> the cell on the left boundary.
> So when the solver iterates the cell variable it is only iterating
> equilibrium values.
> Consequently the system doesn't evolve.
>
> What am I doing wrong?
>

How are you updating the value in the constraint? The constraint value
needs to be a Variable and then the Variable's value needs to be updated.
It seems that from the above code that you are just setting the values as
floats.

Also, you could just include the boundary conditions by hand as sources in
the equation using the divergence operator. This removes any doubt as to
what the boudary conditons are doing. If you look back over the mailing
list I show people how to do this.

Try fixing the updates in the constraints at first and then try adding the
boundary conditions as sources if you can't get that working. Please do get
back to me if you can't get this working.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to