Hello Prof. Hecht,
I have a doubt if FreeFEM can work on 1D periodic multiphysics problem where the physical quantities are coupled. For example, I’m now working on 1d piezoelectric composites with two phases: fiber and matrix. The displacement and electric potential are coupled by the following equation
I use the following code to solve the governing differential equation
load "msh3"
real L0 = 1.;
meshL Th = segment(100,[L0*x]);
fespace Vh(Th,P1,periodic=[[1],[2]]);
real cf = 0.5;
real C1 = 131, e1 = 10.99, k1 = 2.081; // fiber
real C2 = 145.5, e2 = 17.36, k2 = 15.1; // matrix
func Cp = C1*(x<cf*L0) + C2*(x>=cf*L0 && x<=L0);
func ep = e1*(x<cf*L0) + e2*(x>=cf*L0 && x<=L0);
func kp = k1*(x<cf*L0) + k2*(x>=cf*L0 && x<=L0);
Vh N1u,M1u,N1us,v1,v2,xx;
xx = x;
problem microflucNMu([N1u,M1u], [v1,v2]) = int1d(Th)( (Cp*dx(N1u)+ep*dx(M1u))*dx(v1) +
(ep*dx(N1u)-kp*dx(M1u))*dx(v2) ) +
int1d(Th)( Cp*dx(v1)+ep*dx(v2) );
microflucNMu;
plot([xx[],N1u[]],cmm = "distribution of N1u");
plot([xx[],M1u[]],cmm = "distribution of M1u",WindowIndex=1);
However, the solution I got for N1u and M1u are not periodic! Meanwhile, if I degrade to uncoupled elasticity problem using the following equation and code
problem microflucNus(N1us,v1) = int1d(Th)( Cp*dx(N1us)*dx(v1) ) +
int1d(Th)( Cp*dx(v1) );
microflucNus;
plot([xx[],N1us[]],cmm = "distribution of N1us",WindowIndex=2);
Then, I can get the periodic solution for N1us.
I don’t know where the problem is for my multiphysics code. I’ve attached my code below. I used FreeFEM v4.11.
Periodic-1D.edp (1.1 KB)
Thanks a lot if you or anyone else can help.