Skip to content

Boundary Conditions with Heat Equation #2412

Discussion options

You must be logged in to vote

If I copy/paste your code and run locally, it runs fine:

from firedrake import *
  

mesh = UnitSquareMesh(10, 10)
V = FunctionSpace(mesh, family = "CG", degree = 3)  # Scalar
W = VectorFunctionSpace(mesh, family = "CG", degree = 2, dim=2)  # Vetorial
MixedField = V * W
T, q = TrialFunctions(MixedField)
v, w = TestFunctions(MixedField)
x, y = SpatialCoordinate(mesh)
f = Function(V)
T0 = Function(V)  # Identicamente nulo
q0 = Function(V)  # Identicamente nulo
a = (v * div(q) + inner(w, q) + inner(w, grad(T)))*dx
L = f * v * dx
bc0 = DirichletBC(MixedField.sub(0), g=0, sub_domain=1)  # Left Line
bc1 = DirichletBC(MixedField.sub(0), g=1, sub_domain=2)  # Right Line
bc2 = DirichletBC(MixedFie…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@carlos-adir
Comment options

@ScottMacLachlan
Comment options

@carlos-adir
Comment options

@ScottMacLachlan
Comment options

@ScottMacLachlan
Comment options

Answer selected by carlos-adir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants