-
Hello everyone, I want to model a multiphysic problem where I have different PDEs over multiple subdomains. import skfem as fem
basis = fem.Basis(mesh, element)
@fem.BilinearForm
def a_1(u,v,w):
return K_1 * dot(grad(u), grad(v))
@fem.BilinearForm
def a_2(u,v,w):
return K_1 * dot(grad(ln(u)), grad(v))
domain1, domain2 = split_domain(basis)
a = a1.assemble(domain1) + a2.assemble(domain2) But I was not able to find a function which could help me with |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In order to solve a PDE on a subdomain (part of the mesh) you would need to eliminate the degrees-of-freedom that are outside of the subdomain and initialize If you want to solve different PDEs on different subdomains then you do similar restrictions for all subdomains. If you want to couple the different PDEs at the interfaces of the subdomains then you first need to decide what type of coupling approach you want to use: iterative or monolithic. Perhaps the easiest to start with is iterative coupling where you solve one PDE at a time and then take its solution to be a boundary condition for the other PDEs, and iterate different PDEs until convergence. Now the type of the interface condition between the subdomains will decide how the boundary data is applied. If your coupling is Dirichlet type, i.e. something like Your current example is not coupled in any way so I cannot comment further what you should do. I also suggest you start with linear PDEs because it's easier to understand the coupling approach. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! |
Beta Was this translation helpful? Give feedback.
In order to solve a PDE on a subdomain (part of the mesh) you would need to eliminate the degrees-of-freedom that are outside of the subdomain and initialize
Basis
usingelements
keyword argument to restrict numerical integration to the subdomain. Here is an example which does exactly that: https://github.com/kinnala/scikit-fem/blob/master/docs/examples/ex26.pyIf you want to solve different PDEs on different subdomains then you do similar restrictions for all subdomains. If you want to couple the different PDEs at the interfaces of the subdomains then you first need to decide what type of coupling approach you want to use: iterative or monolithic. Perhaps the easiest to start with is ite…