dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #11624
Re: Nonlinear Coupled PDEs, Newton Solver
On Mon, Jan 12, 2009 at 11:06:27AM -0700, Bartosz Sawicki wrote:
> On 11/01/09 11:29 AM, Hatef Monajemi wrote:
> > Refer to attached file please!
>
> Why are you sending plain text file in binary form? This way you are
> limiting your audience.
>
> I can't aswer your questions, but I can convert it into more readable
> format:
> =======
> Hello
>
> I am trying to figure out how to model a Nonlinear problem in dolfin in
> which there is more than one variable, say(u,p). There is currently some
> documents in "demo" and "bench/fem/assembly" which deals with nonlinear
> problmes, but in both of them there exist just one variable. I was
> wondering how the coding process changes when there is coupled PDEs (for
> instance solving Navier-Stokes equation). Based on what I found on
> threads, I could think of augmenting the solution function by defining
> subfunctions, However I think something must have been missed since I do
> not get convergence. I have modeled the same coupled problem assuming
> linearity witout having any problem, but when a nonlinear term comes in,
> it is a bit vague for me how to handle it in dolfin setting. The
> procedure I am following is as follows: (based on nonlinear-poisson demo
> and other docs)
>
>
> ----------------------------------------------------------
> 1)Defining fuction for source and BCs
>
> 2)Define subdomain for BCs
>
> 3)Read Mesh and Subdomain marker
>
> 4)pseudo time
> real t = 0.0;
>
> 5)Source term and initial conditions
> Function Un(mesh,2, 0.0);
> Function Pn(mesh,0.0);
> Function f(mesh,2,0.0);
> XvelNoslip xvelnoslip(mesh);
> YvelNoslip yvelnoslip(mesh);
> VelNoslip velnoslip(mesh);
> Inflow inflow(mesh,&t);
>
> 6)Define SubSystems
> SubSystem velocity(0);
> SubSystem pressure(1);
>
> 7)solution vectors
> Function U0;
> Function P0;
>
> 8)set up Form
> NonlinearproblemBilinearForm a(U0) ;
>
> NonlinearproblemLinearForm L_1(Un,U0,Pn,P0,f);
>
>
> 9)Solve system
> Vector x;
> Function u(mesh,x,a);
> 10)Extract sub functions
> U0 = u[0];
> P0 = u[1];
>
> 11)set up boundary condition
>
> DirichletBC bc0(xvelnoslip,sub_domains,0 , velocity);
> DirichletBC bc1(yvelnoslip,sub_domains,1, velocity);
> DirichletBC bc2(velnoslip,sub_domains,2, velocity);
> DirichletBC bc3(inflow,sub_domains,2, pressure);
>
> 12)collect all the BCs
> Array<BoundaryCondition*> bcs(&bc0,&bc1,&bc2,&bc3);
>
> 13)parameters for time stepping
>
> real T = 0.005;
> real k = 0.001;
>
> 14)time stepping
>
> Progress p("Time-stepping");
>
> while ( t < T )
> {
>
> NonlinearPDE pde(a,L_1,mesh,bcs);
>
>
> 15) Solve nonlinear problem in a series of steps
> real ds = 1.0; real S = 3.0;
> pde.solve(u,t,S,ds);
>
> 16) Save the Solutions
>
> 17) Move to next interval
> p = t / T;
> t += k;
> Un= U0;
> Pn= P0;
> }
> -----------------------------------------------------------------------------
>
> I would appreciate if anyone could give me any suggustions on how to
> consider a "Coupled Nonlinear PDE system" in Dolfin or at least guide me
> to the right place where I can find some documents on that.
>
> Thanks,
> Hatef
Please try the latest DOLFIN version (0.9.0) and then ask again.
--
Anders
Attachment:
signature.asc
Description: Digital signature
References