Hi Nicolas,

Here are some answers to your questions:

1) The sourceforge outage is terrible, I can't believe it has been so long. They are saying the end of April before the sync is working again!
We will be switching over to subversion very soon and maybe even having two repositories available. But, this is a few weeks away.
One option is to make nightly tarballs available during the period of the outage; let me discuss this with my colleagues. For now, 
you will just have to wait.

2) Thanks for this example. It has highlighted two separate problems. Firstly, the ConvectionTerm is assuming that the DiffusionTerm is on the same side
of the equation and that the diffusion term is being added to the right hand side. The following fixes the problem, though it is somewhat ugly, by changing

    >>> eq = diffTerm + PowerLawConvectionTerm(coeff = convCoeff, diffusionTerm = diffTerm)

to:

    >>> from fipy.terms.transientTerm import TransientTerm
    >>> eq = TransientTerm(1e-100) == diffTerm + PowerLawConvectionTerm(coeff = convCoeff, diffusionTerm = diffTerm)

I had to add the TransientTerm(1e-100) because:

    >>> eq = 0 == diffTerm + PowerLawConvectionTerm(coeff = convCoeff, diffusionTerm = diffTerm)

doesn't currently work. I have to fix the Peclet number calculation so it is independent of LHS or RHS, but can't see a clean way just yet.
We are hoping to remove the need to pass the DiffusionTerm to the ConvectionTerm, so at that point we will try and get the problem ironed out.

The other thing is that the default solver (LinearCGSSolver) was not converging. I changed the solver to LinearLUSolver and everything seems
okay. Here is a revised version of the script you sent me, which should now work.

L = 10.
nx = 1000
dx =  L / nx
from fipy.meshes.grid1D import Grid1D
mesh = Grid1D(dx = dx , nx = nx)

valueLeft = 0.
valueRight = 1.

from fipy.variables.cellVariable import CellVariable
var = CellVariable(name = "concentration",mesh = mesh,value = valueLeft)

from fipy.boundaryConditions.fixedValue import FixedValue
boundaryConditions = (FixedValue(mesh.getFacesLeft(), valueLeft),FixedValue(mesh.getFacesRight(), valueRight))

from fipy.solvers.linearLUSolver import LinearLUSolver
solver = LinearLUSolver()

import fipy.viewers
viewer = fipy.viewers.make(vars = var)

diffCoeff = 0.1

for convCoeff in range(10,20,1):

    var[:] = valueLeft
    Peclet_number = (convCoeff*dx) / diffCoeff
    print 'peclet_number=',Peclet_number

    from fipy.terms.implicitDiffusionTerm import ImplicitDiffusionTerm
    diffTerm = ImplicitDiffusionTerm(coeff = diffCoeff)

    from fipy.terms.powerLawConvectionTerm import PowerLawConvectionTerm
    from fipy.terms.transientTerm import TransientTerm
    eq = TransientTerm(1e-100) == diffTerm + PowerLawConvectionTerm(coeff = convCoeff, diffusionTerm = diffTerm)

    eq.solve(var = var,boundaryConditions = boundaryConditions, solver = solver)

    viewer.plot()


3) No, FiPy does not use cylindrical coordinates explicitly. There may be a way to fake it by resizing the coefficients by some geometric quantity. I am
not sure off the top of my head. What you can do, however, is to use a wedge shaped mesh. The change in element volumes does a good job of
approximating cylindrical coordinates. There is some associated error, of course. It all depends on the error you are willing to tolerate.

On Apr 20, 2006, at 10:43 AM, GREUILLET Nicolas wrote:

Hi Daniel

 

I'm sorry to solicit you once again, but I have three important problems:

 

  1. I do not succeed in getting the FiPy update

 

I've tried to download the last version of Fipy by typing:

cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/fipy checkout -r HEAD fipy

 

But I couldn't get a version with the flow example (examples/flow/stokesCavity.py.)

 

After I've been at the address given in your last mail: http://cvs.sourceforge.net/viewcvs.py/fipy/fipy/examples/ , but according to http://sourceforge.net/docs/A04/, the CVS server status is : partial outage in progress.

 

How could I download the Fipy update I need to work (with relaxation-algorithm)?

 

 

  1.  They are convergence problems depending on the Peclet number

 

I've taken the Fipy's 1D convection (convection\powerLaw1D) example and I've modified it to solve the equation with several Peclet numbers (file is attached to the mail).

 

From a critical Peclet number the algorithm can’t converge and in the simulation of welding process the Peclet number is about to 10^6.

 

I would like to know what you think about that.

 

 

  1. Cylindrical coordinates

 

Is it possible to work with cylindrical coordinates under Fipy (2D axisym)?

 

 

Thank you very much for your help.

 

Nicolas

<convdiff1D.py>

-------------------------------------

Daniel Wheeler

Telephone: (301) 975-8358


Reply via email to