Thanks for your quick reply

The system I want to describe is a tube, which has a defined temperature at the 
outside. Inside the tube is the fluid with the velocity of v_f. The Fluid is 
cold and shall get a heat flux about the wall of the tube. My domain feature is 
the fluid surrounded by a tube. The inside of the tube is touching the boundary 
of the Fluid.
I am working in 2D and both, the tube and the fluid, are included in my file. 
The file is a little bit larger, but I try to post the most important things.
I define for both, the tube and the fluid, separated meshs, so that the systems 
will solve one after another.  The both systems are linked about their boundary 
conditions. And I want to solve the steady state solution, thus I iterate the 
both systems in a “while loop” till the temperature profiles are constant.


     tube = CellVariable(name="temperature [C]", mesh=mesh,value = 0.)
     nx = 100
     ny = nx
     dx = D_r/100     #D_r is the size of the tube
     dy = L/100
     mesh = Grid2D(dx=dx, dy=dy, nx=nx, ny=ny)

     boundaryConditionsWand = (
     FixedValue(faces=mesh.getFacesRight(),  value=Fluid(1,0,6000)),
     FixedFlux(faces=mesh.getFacesLeft(), 
value=-h_rs*a_rs*(tube(1,0,6000)-Fluid(1,0,6000)))


     tube.equation = (ImplicitDiffusionTerm(coeff=k_r))
     tube.equation.solve(var=tube, boundaryConditions=boundaryConditionsWand, 
solver=DefaultAsymmetricSolver(tolerance=1.e-100, iterations=10000)) 
     T_w=tube

this give me the temperature of the tube. and now I solve the fluid:

     Fluid  = CellVariable(name="temperature [C]", mesh=mesh,value = 0.)
     nz = 100
     nr = nz
     dz = L/100
     dr = D/200
     mesh = CylindricalGrid2D(dr=dr, dz=dz, nr=nr, nz=nz)

     boundaryConditionsFluid = (
     FixedFlux(faces=mesh.getFacesTop(), value=0),
     FixedValue(faces=mesh.getFacesBottom(),  value=T_ef),
     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))))
   
    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))
   T_f=Fluid


The solution gives me the temperature profiles, but I use a FixedFlux and I 
want that the Flux will be calculate in each cell of the system.
How can I write it?



-------- 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

Reply via email to