On Tue, May 29, 2012 at 4:35 AM, Yun Tao <[email protected]> wrote:

> Q1:
> As observed from previous testing under both 1 and 2-D, the preservation of
> a probability density function under pure convection is extremely sensitive
> to the mesh's spatial resolution.

It's as sensitive as the order of accuracy. At least it should be.

> However, though we have an equation that
> helps us determine the proper mesh size to use for a diffusion process, I
> can't find similar equations on the site relating TimeStepDuration, dx or
> dy, and convection/diffusion coefficients for all the convection terms.

It's just the CFL condition for convection. A good rule of thumb for
the time step size is 0.1 * dx / maximum_velocity.

> An interesting note about solution stability: even when the viewer window is
> much smaller than the grid area, the solutions tend to fall apart (or
> generate these comb-effects) near the edges of the viewer window.

The line along the edges is caused because the default boundary
condition is no flux which means that material builds up along the
zero flux boundary.

> Furthermore, small regions of solutions along those window's edges appear
> unstable (see video's bottom and left-hand edges). This noise makes it
> necessary to pre-set datamin and datamax in the viewer. But, the pre-sets
> are problematic when one is dealing with probability density functions that
> may easily break free from the limited range. Any advice would be deeply
> appreciated.

It's not unstable. It's just the zero flux boundary condition (there
is more material entering the cell than leaving it as a consequence of
the chosen boundary conditions). If you move the fixed value boundary
condition to include all the left and bottom faces, then and this
problem should go away.

> Q2:
> As the solution evolves under pure advection, I noticed that the minimum
> value of the solution gets exponentially smaller. Over 300 time steps of
> pure advection, the sample module's log10(min(phi)) are:
>
>> [  -5.06578143   -5.46372144   -5.86166144   -6.25960145   -6.65754146 ...
>>  -130.41688416 -130.81482417 -131.21276418 -131.61070418 -132.00864419]
>
>
> I'm not sure where the minimal value resides in my bivariate plot. Plus,
> this exponential decrease makes it impossible to logarithmically scale the
> colorbar in a useful way.

The function numerix.argmin will tell you the cell ID of the minimum
value and then you can use mesh.getCellCenters()[:,ID] to find the
location. The values are probably getting small because the inlet
condition is convecting a value of 0 into the domain. You'll just have
to mask some of the values for a log plot.

> Q3:
> I am desperate to figure out how to have to solution advect to a fixed point
> in space. I've tried IF statements to no avail. Again, any pointer will be a
> life-saver.

I am not sure what you mean. Do you mean that the flow should all be
going to a point location? You could certainly construct a velocity
that points to a single point. Can you write what you want
mathematically?

-- 
Daniel Wheeler

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

Reply via email to