Diffusion through composite radial layers

16 views
Skip to first unread message

Fausto Arinos de A. Barbuto

unread,
May 11, 2021, 11:26:48 PM5/11/21
to Fipy

Dear all,

I think everyone here knows what an insulated pipeline is: a pipe composed
of an inner metallic tube covered by a layer of elastomer or any other
insulating material. The inner tube and the insulation obviously have 
different thermal diffusivities but their thicknesses may or may not be 
the same (they usually aren't).

I found a script in this FiPy list which I adapted to a single-layer pipe
section (2D radial geometry), attached to this note. Easy. Now I'm trying
to add a second layer, the insulation. I have the following lines:

    eqn = fipy.TransientTerm() == fipy.ImplicitDiffusionTerm(coeff=D)

    X, Y = mesh.faceCenters

    innerWall = (mesh.exteriorFaces & (np.sqrt(X**2+Y**2) <= radiusI))
    outerWall = (mesh.exteriorFaces & (np.sqrt(X**2+Y**2) >= radius))

    T.constrain(value=100.0, where=outerWall)
    T.constrain(value=300.0, where=innerWall)

I think I might add a "midFace" representing the junction or interface 
between the two layers, but:

1.    The temperature in midFace must not be fixed, as it represents the
temperature common to both the metallic pipe's outer wall and the 
insulation's inner wall, as the layers are in contact;

2.    I need a second equation "eqn2" to represent the heat transfer through
the insulation layer. I understand that the existing eqn and eqn2 will be
similar in their features but they must be coupled. The question is: how?

3.    I also feel that the definitions of innerWall and outerWall are not
right, but I'm not sure. I'm using an unstructured mesh.

Any help will be much appreciated. Thanks.

Fausto
PipeWallHeat_.py

Daniel Wheeler

unread,
Jul 21, 2021, 12:09:09 PM7/21/21
to Fausto Arinos de A. Barbuto, Fipy
Hi Fausto,

Sorry for not replying to this in a timely manner.

Regarding the "midFace", it's not necessary to have any specially
defined faces between the materials as long as the material properties
are defined correctly at every location in the mesh. The numerical
discretization handles this completely implicitly. However, it might
be good to align the faces with the mid-boundary for the purposes of
numerical accuracy (cells will lie completely in one material or
another and not traverse the mid-boundary). Gmsh will most likely do
that for you.

You do not need two equations. A single equation is all that is
required. Just make the diffusion coefficient spatially dependent like
this

X, Y = mesh.faceCenters
R = np.sqrt(X**2+Y**2)
R_mid = (radius + radiusI) / 2
D = fipy.FaceVariable(mesh=mesh, value=2.5e-03)
D[R < R_mid] = 100.0

for example. This will work immediately with the mesh you have, but,
again, you might want nicely aligned faces at the mid-boundary.

Regarding the "innerWall" and "outerWall", it does seem to be working
looking at the results. However, the definition you've used is very
dicey since if the vertices are on the boundary then I'd expect the
face centers to be displaced from the exact boundary locations.
Anyway, to be sure you could use

innerWall = mesh.exteriorFaces & (R < R_mid)
outerWall = mesh.exteriorFaces & (R > R_mid)

That would avoid any issues with numerical rounding or offsets in the
face centers.

Hope the above helps.

Cheers,

Daniel
> --
> To unsubscribe from this group, send email to fipy+uns...@list.nist.gov
>
> View this message at https://list.nist.gov/fipy
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to fipy+uns...@list.nist.gov.



--
Daniel Wheeler
Reply all
Reply to author
Forward
0 new messages