10 Jul 00:43
Setting boundary conditions on interior cells
From: Tony S Yu <tonyyu@...>
Subject: Setting boundary conditions on interior cells
Newsgroups: gmane.comp.python.fipy
Date: 2008-07-09 22:45:59 GMT
Subject: Setting boundary conditions on interior cells
Newsgroups: gmane.comp.python.fipy
Date: 2008-07-09 22:45:59 GMT
This is probably a bad idea, but I want to set a boundary condition on an interior cell. Alternatively, I would just have a rectangular mesh with some of the nodes masked off (kind of like a step on one of the rectangle's sides). The problem with changing the mesh in this manner is that this boundary condition needs to move in time. My first thought was to force a cell to a given value by repeatedly resetting its value inside the solution loop. But, since the diffusion terms use the face values (not cell values) in the solution, I'm not getting the value back. The next (bad) idea I had was to set the face values, but I didn't see a way of doing this. Is there a way of setting a boundary condition on an interior cell? Thanks, -Tony Test script: ~~~~~~~~~~~~~~~ from fipy import * dt = 0.001 # material properties D = 1. c0 = 1. c_sink = 0. # spacial parameters nx = ny = 3 dx = dy = 1.(Continue reading)
RSS Feed