I'm afraid I still don't understand exactly what you're trying to do. The 
meshes in your script all overlap (and they're all named "mesh") so it's quite 
hard to tell where in space your different fields are defined and what exactly 
you want passed from one to another.

If you're trying to do what I think you're trying to do, I think you'll have 
better luck solving a single heat flux equation over all of the domains (tube, 
fluid, foam, etc.) with spatially-dependent coefficients.

On May 5, 2010, at 1:17 PM, Alexander Holbach wrote:

> Hi,
> 
> in the addition is the code of the simulation. The file is a little bit 
> larger. I have there a lot of correlations inside the file.
> And the Problem is a little bit larger, because I have there also a fluid 
> outside the tube and inside the tube a metal foam. But my Problem is the 
> same, that I don´t know how to write the flux boundary between the sperated 
> parts (fluid,tupe and foam)
> 
> Thanks for your reply
> Alexander
> 
> -------- Original-Nachricht --------
>> Datum: Wed, 5 May 2010 11:44:53 -0400
>> Von: William Gathright <[email protected]>
>> An: Multiple recipients of list <[email protected]>
>> Betreff: Re: flux boundary
> 
>> 
>> Hi Alexander,
>> I would suggest that we need a little more information about your
>> problem to be as helpful as possible.  Are you working in 1D or 2D?
>> Are both the tube and the fluid included in your simulation domain, or
>> just the tube?
>> 
>> The reason I ask is that the boundary conditions are designed to be
>> applied at the external faces of your domain.  For example, if your
>> domain features a tube surrounded by a fluid, the boundary conditions
>> should only pertain to the fluid (since the fluid is the only thing
>> touching the boundary of your domain).
>> 
>> If you want a flux that is calculated in every cell of your system,
>> you'll get that by solving your heat equations.  For that, you may
>> want to try declaring "Heat" or "Temperature" to be your CellVariable
>> instead of "Fluid" or "Tube".  Again, with a little more information
>> about your problem and your code we may be able to provide more
>> detailed help.
>> 
>> - Will Gathright
>> Rensselaer Polytechnic Institute
>> Department of Materials Science and Engineering
>> 
>> On Wed, May 5, 2010 at 11:14 AM, Alexander Holbach <[email protected]>
>> wrote:
>>> 
>>> Hi,
>>> I am using the PDE solver in a system.
>>> But I have problems with my boundarys. The system shall simulate a heat
>> transfer from tube to Fluid. So I wrote two systems with two seperated PDE
>> solvers.
>>> 
>>> I'd like to know how I may implement the following boundary condition
>> over the right and left faces:
>>> the equations are:
>>> 
>>> …
>>> tube = CellVariable(name="temperature [C]", mesh=mesh,value = 0.)
>>> tube.equation = (ImplicitDiffusionTerm(coeff=k_r))
>>> tube.equation.solve(var=tube,
>>>        boundaryConditions=boundaryConditionsWand,
>>>        solver=DefaultAsymmetricSolver(tolerance=1.e-100,
>> iterations=10000))
>>> 
>>> …
>>> and
>>> …
>>> 
>>> Fluid  = CellVariable(name="temperature [C]", mesh=mesh,value = 0.)
>>> Fluid.equation = ImplicitDiffusionTerm(coeff=k_fg)==
>> rho*cp*ExplicitUpwindConvectionTerm(coeff=((v_f,)))
>>> Fluid.equation.solve(var=Fluid,
>>>        boundaryConditions=boundaryConditionsFluid,
>>>        solver=DefaultAsymmetricSolver(tolerance=1.e-100,
>> iterations=10000))
>>> 
>>> and now I want to implement the boundary condition, that there is a Flux
>> in each mesh cell from the tube to the Fluid.
>>> What I can write is:
>>> …
>>> 
>>> FixedFlux(faces=mesh.getFacesLeft(),
>> value=h_rf*a_rf*(tube(1,0,6000)-Fluid(1,0,6000))),
>>>    FixedFlux(faces=mesh.getFacesRight(),
>> value=h_rf*a_rf*(tube(1,0,6000)-Fluid(1,0,6000))))
>>> …
>>> 
>>> but this is a fix Flux and I want that the Flux will be calculate in
>> each cell of the system.
>>> 
>>> Is this possible?
>>> 
>>> Thank for your help
>>> Alexander
>>> --
>>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>> 
>>> 
>> 
> 
> -- 
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
> <boundary_problem.py>



Reply via email to