Hi,

Thank you for a very good program!

I am using FiPy to solve the heat equation in a cartesian geometry.  I am
trying to set both a convective and a radiative boundery condition on the
right side of the geometry. I have done this by applying a source on the
boundary as follows:

maskRight = CellVariable(mesh, value=0.,unit="1")
maskRight.setValue(1, where=(mesh.getCellCenters()[0] > Lx - dx))

convectionOut = maskRight * (T - Tinf) * hAir  / dx          # [W/m^3]
radiationOut = maskRight * epsBoxOut * sigma * (T**4-Tinf**4) / dx
 #[W/m^3]
source = heaterCellMask * dW         #[W/m^3]

eqn = ImplicitDiffusionTerm(coeff=k) - convectionOut - radiationOut +
source == TransientTerm(coeff=cp*density)

while time < endTime:
    T.updateOld()
    residual = 100
    while residual > desiredResidual:
        residual = eqn.sweep(var=T,dt=timeStepDuration)
    time += timeStepDuration;

I took this method from a post from 2006,*
http://www.mail-archive.com/[email protected]/msg00206.html .*My question is if
this works with the implicit solver since the boundary sources depends on
the temperature? I have also tried to use another way of representing the
convective boundary using an implicit source as follows (from this post
http://osdir.com/ml/python-fipy/2009-11/msg00045.html):

mask = mesh.getFacesRight()
outCoeff = (mask*[[hAir], [0]]).getDivergence()
convectionOut = ImplicitSourceTerm(coeff=outCoeff) - outCoeff * Tinf

The result is almost identical. But i just want to be on the save side, so
i don't run in to trouble later on. If this later method should be to
prefer for the implicit solver then i wonder how one would represent the
4:th power of the implicitSource when applying the radiative boundery? Or
maybe I should do this in some other way?

Best regards
Per Dahlbäck
_______________________________________________
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