With any luck this has now been dealt with. Latest versions of
branches/version-2_1 and trunk/ should now have the fixes for
<http://matforge.org/fipy/ticket/294>

On Tue, May 11, 2010 at 5:44 PM, Eduard Manley <[email protected]> wrote:
> Hi,
> thanks for your reply.
>
> You can find attached a sample problem.
>
> The equation is a heat equation, variable is temperature,other and transient
> and diffusion term, there is a spatially varying source term (q) computed
> by analytical expression which is and hyperbola.
>
> We should reach about 100°C in 30-35 sec and the shape of the solution
> should be similiar to and hyperbola.
>
> As it is now the file works fine (mesh declared with:  mesh =
> CylindricalGrid1D(dr=dr, nr=(len(DR))) + (r_int,) ) but if you define the
> mesh with ( mesh = CylindricalGrid1D(dx=DR) + (r_int,) ) the result you
> obtain are wrong.
>
> The 2 declaration of CylindricalGrid1D should be the same, the face and cell
> centers are the same, but the result are different.
>
> You can observe the same problem also when solving the same equation
> but without transient term.
>
> Thanks
>           Eduard
>
>
>
>> Date: Tue, 11 May 2010 10:45:24 -0400
>> From: [email protected]
>> To: [email protected]
>> Subject: Re: Problem in solving Poisson equation with 1D Cylindrical mesh
>>
>>
>> Can you put together the simplest script possible that demonstrates
>> the problem and I'll try and debug it? Thanks.
>>
>> On Thu, May 6, 2010 at 2:01 PM, Eduard Manley <[email protected]>
>> wrote:
>> > Thanks for your reply.
>> >
>> > I probably found the reason of the problem.
>> >
>> > As said before I'm trying to solve an eq of this type:
>> >
>> > A(d phi/d t) =  div (D grad phi) + q
>> >
>> > where A and D are costant coefficient and q is a spatially varying heat
>> > source.
>> >
>> > The problem is in how I create the cylindrical 1D mesh (origin of the
>> > mesh
>> > is not in 0.).
>> >
>> > It doesn't matter if the discretization is logarithmic or uniform but
>> > how I
>> > declare it:
>> >
>> > (using a uniform spacing:)
>> >
>> > **  mesh = CylindricalGrid1D(dx=dr, nx=(len(DR))) + (r_int,)  **
>> > SHOULD BE EQUAL TO:
>> >
>> > **  mesh = CylindricalGrid1D(dx=DR) + (r_int,)  **
>> >
>> > [dr = 5e-04, nr=58, r_int=0.00125, DR is a list which contains the
>> > various
>> > dx(58 elements of value dr for uniform grid)]
>> >
>> > BUT It is NOT.
>> >
>> > The mesh (cell centers, facecenters) is ok but the results are NOT.
>> > The results are right only if I create the mesh using dx=dr and nx=.. .
>> > And this is why before I thought the problem was the logaritmic
>> > discretization (must use DR=[...]).
>> >
>> > As said before with Cylindrical 2D mesh results are instead correct.
>> > Is this a bug?
>> >
>> >> Date: Thu, 6 May 2010 11:11:10 -0400
>> >> From: [email protected]
>> >> To: [email protected]
>> >> Subject: Re: Problem in solving Poisson equation with 1D Cylindrical
>> >> mesh
>> >>
>> >>
>> >> Edward, This may be to do with having a very small volume (or area or
>> >> line or point) for the inner most element of the domain. It should be
>> >> the same whether one is using a 1D or 2D mesh. Since you are getting
>> >> differences in the 1D and 2D case, it should be relatively easy to
>> >> debug and figure out what's going on It could also be that the
>> >> boundary condition on the inner boundary as zero area and this is
>> >> causing issues. Try shifting the grid by a small value away from the
>> >> zero point and see if things are improved. I have always had this
>> >> issue with cylindrical grids and have never really had a satisfactory
>> >> solution (other than shifting away from the zero point). If you
>> >> discover a better way to handle this, let me know. Cheers.
>> >>
>> >>
>> >> If you can't debug it, then send me the most minimalist scripts that
>> >> show the issue and I'll give it a shot.
>> >>
>> >> On Wed, May 5, 2010 at 9:53 PM, Eduard Manley <[email protected]>
>> >> wrote:
>> >> > Problem partially solved:
>> >> >
>> >> > I'm using a logarithmic discretization (first dr= 5e-04 and next
>> >> > dr increasing as 1.05)(with internal radius= 0.00125, external
>> >> > radius=0.03)
>> >> > and,
>> >> > for some unknown reason this create problems and wrong result with
>> >> > cylindrical 1D mesh. I tried using a uniform discretization (dr=5e-04
>> >> > nx=58)
>> >> > and now the result is correct.
>> >> >
>> >> > However I need to use the logarithmic discr. so after some hours of
>> >> > sleep
>> >> > I'll think about the reason.....
>> >> >
>> >> > ________________________________
>> >> > Hotmail: Trusted email with powerful SPAM protection. Sign up now.
>> >>
>> >>
>> >>
>> >> --
>> >> Daniel Wheeler
>> >>
>> >>
>> >
>> > ________________________________
>> > Your E-mail and More On-the-Go. Get Windows Live Hotmail Free Sign up
>> > now.
>>
>>
>>
>> --
>> Daniel Wheeler
>>
>>
>
> ________________________________
> Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up
> now.



-- 
Daniel Wheeler


Reply via email to