Hello NGSolve users!
I am pretty new to the software and my question might be caused by my inexperience, but even after doing the tutorials and watching the videos, i struggle to impose inhomogeneous Dirichlet boundary conditions on the example of unsteady heat equation (similar to 3.1):
I want to set a certain temperature at the bottom boundary of the unit square and i do so by setting gfu.Set(mytemperature, BND)
and embedding it into the load vector
rhs = f.vec.CreateVector()
rhs.data = f.vec - a.mat * gfu.vec ,
like shown in section 1.3 of the tutorials.
Using this new right hand side in the implicit Euler scheme given in 3.1
res.data = dt * rhs - dt * a.mat * gfu.vec
gfu.vec.data += invmstar * res
causes the solution to explode in the vicinity of the Dirichlet boundary.
(Another small issue: I am currently not able to use ‘dx’ for the definition of the bilinear and linear forms. Despite using version 6.2.1810 on python 3.7, the error states that dx is not defined. So i just used SymbolicBFI() instead)
Again, sorry if this is a obvious mistake, but im really stuck here.
I attached a python script containing the code that doesn’t behave like i expect it to.
Thanks in advance for your supportnd kind regards!
Lukas
Attachment: test.py