Reputation: 1
I am using FreeFem++ to solve the Poisson equation over a complicated geometry. I want to solve it over a heterogeneous region. The value of f in ΔΦ=f changes between multiple sub-regions. Is there any way to do this? So far I have found only examples of homogenous regions. I am relatively new to finite element analysis.
Upvotes: 0
Views: 340
Reputation: 1
I'm not a FreeFEM++ expert by any stretch, but have you tried defining f on the different regions as
func f = f_1(x,y)*(condition_1) + ... + f_n(x,y)*(condition_n)
For example, if I were doing this on a region defined by a smaller circle of radius a on which f=x*y, surrounded by a bigger circle of radius b on which f=sin(x), I'd do
func f = x*y*(sqrt(x^2+y^2)<=a) + sin(x)*(sqrt(x^2+y^2)>a)
Of course, this depends on the conditions being mutually exclusive.
Upvotes: 0