dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #16332
Re: [FEniCS-users] Axisymmetric deformation
On Tue, Oct 20, 2009 at 09:20:50PM +0900, azumi.hayakawa@xxxxxxxxxxxxxxxxxxx wrote:
> Thanks a lot for your help.
>
> I meant r and z to be independent varibles
> in the cylindrical coordinate system.
> I think I could made a step forward,
> and reached the code below. I will play
> with the code tomorrow. I appreciate
> your help if you point out anything wrong
> with the code.
>
> Regards,
> -azumi
>
> mesh = Mesh("xxx.xml")
> mesh.order()
> V = VectorFunctionSpace(mesh, "CG", 1)
> W = FunctionSpace(mesh, "CG", 1)
>
> v = TestFunction(V)
> u = TrialFunction(V)
>
> E = 1.52e11
> nu = 0.3
>
> mu = E / (2*(1 + nu))
> lmbda = E*nu / ((1 + nu)*(1 - 2*nu))
>
> R = Function(W, "x[0]")
This will need to be
R = Expression("x[0]", V=W)
when you move to DOLFIN 0.9.4.
--
Anders
> def epsilon(v):
> return as_matrix([[v[0].dx(0), 0],
> [0, v[1].dx(1)],
> [v[0].dx(1), v[1].dx(0)],
> [v[0]/R, 0]])
>
> def sigma(v):
> return E/((1+nu)*(1-2*nu))*as_matrix([[1-nu, nu, 0, nu ],
> [nu, 1-nu, 0, nu ],
> [0, 0, (1-2*nu)/2, 0],
> [nu, nu, 0, 1-nu]]) * epsilon(v)
>
> a = 2*pi*R*inner(epsilon(v), sigma(u))*dx
>
>
>
> From: Anders Logg <logg@xxxxxxxxx>
> Subject: Re: [FEniCS-users] Axisymmetric deformation
> Date: Mon, 19 Oct 2009 14:25:13 +0200
>
> > On Mon, Oct 19, 2009 at 12:40:49PM +0100, Garth N. Wells wrote:
> >>
> >>
> >> Anders Logg wrote:
> >> >On Mon, Oct 19, 2009 at 12:40:25PM +0900, azumi.hayakawa@xxxxxxxxxxxxxxxxxxx wrote:
> >> >>Hello.
> >> >>
> >> >>I want to implement a bilinear form for axisymmetric
> >> >>elastic problems on cylindrical coordinates (r, theta, z).
> >> >>All of displacement, strain, and stress are assumed
> >> >>to be axisymmetric. I am expecting the form will look
> >> >>like:
> >> >> def epsilon(v):
> >> >> return
> >> >> [ del(v.r)/del(r) 0 ]
> >> >> [ 0 del(v.z)/del(z)]
> >> >> [ del(v.r)/del(z) del(v.z)/del(z)]
> >> >> [ v.r/r 0 ]
> >> >
> >> >Try this:
> >> >
> >> > def epsilon(v):
> >> > return as_matrix([[del(v.r)/del(r), 0],
> >> > [0, del(v.z)/del(z)],
> >> > [del(v.r)/del(z), del(v.z)/del(z)],
> >> > [v.r/r, 0]])
> >> >
> >> > def sigma(v):
> >> > return E/((1+nu)*(1-2*nu))*as_matrix([[1-nu, nu, 0, nu ],
> >> > [nu, 1-nu, 0, nu ],
> >> > [0, 0, (1-2*nu)/2, 0],
> >> > [nu, nu, 0, 1-nu]]) * epsilon(v)
> >> >
> >>
> >> Are r and z functions?
> >>
> >> I guess FFC will soon support using coordinates in a .ufl file.
> >
> > There is already a Function named MeshCoordinates defined in
> > SpecialFunctions.h.
> >
> > Perhaps we could just predefined x, y, z as being components of this
> > Function in PyDOLFIN?
> >
Attachment:
signature.asc
Description: Digital signature
References