Hi allI'm working on a fluid-flow/heat-transfer simulation involving two 3D 
meshes. One mesh corresponds to a plate-shaped solid domain with a hollow 
inside (with exposed inlets ans outlets - ie., it's a through hole). The other 
mesh is this hollow - it's a channel that fits into the plate's hollow and is 
supposed to be water.

Heat is being supplied on the faces of the plate, and water flows into the 
channel inlet at a fixed velocity and leaves at zero pressure. So essentially, 
I need to model heat transfer between the solid and liquid domains to get the 
steady-state temperature distribution.

It would be quite difficult to have just one mesh and divide it into two 
regions, as the channel can have a complicated shape, and getting boundary 
markers from a msh file is something I'd rather not try. Right now I'm 
identifying boundaries using on_boundary and boolean expressions -  with or 
without assigning a meshfunction number depending on whether I need a Neumann 
or a Dirichlet condition on that boundary.

My space and function declarations are like this:

scalar = FunctionSpace(liqmesh, "CG", 1)
Tspace = FunctionSpace(solmesh, "CG", 1)
Tempspace = scalar * Tspace

vector = VectorFunctionSpace(liqmesh, "CG", 1)
system = vector * scalar                    # This is for the Stokes equation

parameters['allow_extrapolation'] = True

T, Ts = TrialFunctions(Tempspace)
Tp, Tsp = TestFunctions(Tempspace)

My variational form looks like this:

aheat = inner(u, grad(T))*Tp*dx + alphaw*inner(grad(T), grad(Tp))*dx + 
alphas*inner(grad(Ts), grad(Tsp))*dx + alphaw*hconv*T*Tp*dsl(ml_wall)  + 
alphas*hconv*Ts*Tsp * dsh(mhnumconv) - alphaw*hconv*project(Ts, scalar) *Tp* 
dsl(ml_wall) - alphas*hconv*project(T, Tspace)*Tsp * dsh(mhnumconv)

Lheat = alphas*heatflux*Tsp*dsh(mhnum) + Constant(0)*Tsp*dx + Constant(0)*Ts*dx

where aheat and Lheat are the LHS and the RHS. Please note that alphas, alphaw 
andhconv are float constants and mhnumconv, ml_wall and mhnum are meshfunction 
markers. T is the liquid trialfunction and Ts the solid trialfunction. So I've 
done the heat exchange from liquid to solid simply using Q = hA(T - Ts).

But when I run the program, I get an error like this:
Traceback (most recent call last):
  File "stokes-stab-fin-ss.py", line 185, in <module>
    aheat = inner(u, grad(T))*Tp*dx + alphaw*inner(grad(T), grad(Tp))*dx + 
alphas*inner(grad(Ts), grad(Tsp))*dx + alphaw*hconv*T*Tp*dsl(ml_wall)  + 
alphas*hconv*Ts*Tsp * dsh(mhnumconv) - alphaw*hconv*project(Ts, scalar) *Tp* 
dsl(ml_wall) - alphas*hconv*project(T, Tspace)*Tsp * dsh(mhnumconv)
  File "/usr/lib/python2.7/dist-packages/dolfin/fem/projection.py", line 104, 
in project
    form_compiler_parameters=form_compiler_parameters)
  File "/usr/lib/python2.7/dist-packages/dolfin/fem/assembling.py", line 308, 
in assemble_system
    assembler = cpp.SystemAssembler(A_dolfin_form, b_dolfin_form, bcs)
  File "/usr/lib/python2.7/dist-packages/dolfin/cpp/fem.py", line 2157, in 
__init__
    _fem.SystemAssembler_swiginit(self,_fem.new_SystemAssembler(*args))
RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     [email protected]
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to assemble system.
*** Reason:  expected a linear form for L.
*** Where:   This error was encountered inside SystemAssembler.cpp.
*** Process: 0
*** 
*** DOLFIN version: 1.3.0
*** Git changeset:  unknown


So I guess the problem is my usage of the 'project' function in the form. So 
how can I do this? Please help me solve this problem. Any hints are welcome.
Thanks.
Aditya Kashi
_______________________________________________
fenics-support mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics-support

Reply via email to