[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Getfem-users] Build a transport equation with the generic procedure
From: |
Yves Renard |
Subject: |
Re: [Getfem-users] Build a transport equation with the generic procedure |
Date: |
Mon, 19 Apr 2010 11:18:33 +0200 |
User-agent: |
KMail/1.9.9 |
Dear Sebastien,
You are right, the convect function is not in the 4.0.0 stable version.
You can find a svn snapshot where it is present here :
http://math.univ-lyon1.fr/homes-www/renard/temp/getfem-4.0.tar.gz
As far as I know, SUPG method consists in additional terms for stabilization.
It should not be very hard to add these terms but I did not practice it.
Yves.
On samedi 17 avril 2010, sébastien janas wrote:
> I don't find the file "getfem/getfem_convect.h" in the getfem 4.0.0
> sources, where is defined the convect function ?
>
> To your knowledge, is it possible to implement PG or SUPG method with
> getfem functions ?
>
> Best regards,
>
> Sébastien
>
> PS : Yves, sorry for the double message, I forgot to reply to all
>
> Le vendredi 16 avril 2010 à 22:43 +0200, Renard Yves a écrit :
> > Dear Sebastien,
> >
> > The finite element method is instable for the resolution of convection
> > problems. At least without treatment. There is several possible
> > treatments (Petrov-Galerkin, SUPG, additional diffusion term ...). Or
> > you can use another method. A caracteristic Galerkin method is
> > implemented in Getfem, see the command
> > E = gf_compute(mesh_fem MF, vec U, 'convect', mesh_fem mf_v, vec V,
> > scalar dt, int nt[, string option])
> >
> > But this is a very dissipative method.
> >
> >
> > I think your term should be
> >
> > D = gf.asm_volumic('a=data(mdim(#1),#2); M(#1,#1)+=
> > comp(Grad(#1).Base(#1).Base(#2))(:,i,:,k).a(i,k)',mim,mf_u,mf_d,DATA)
> >
> > with mf_d a scalar fem.
> >
> >
> > Yves.
> >
> > sébastien janas <address@hidden> a écrit :
> > > Hi,
> > >
> > > I try to solve a transport equation with getfem.
> > >
> > > I have problem to deal with the term
> > >
> > > div ( RHO * Y * U )
> > >
> > > where
> > >
> > > - div is the divergence
> > > - RHO is the density
> > > - Y is a moisture content
> > > - U is the velocity
> > >
> > > I try to build the matrix
> > >
> > > (PSI_x^i * RHO * U_x * PSI^j ) +
> > > (PSI_y^i * RHO * U_y * PSI^j ) +
> > > (PSI_z^i * RHO * U_z * PSI^j )
> > >
> > > where - PSI_a^b are the derivative of the base functions at nodes b in
> > > respect to ditection a
> > >
> > > - PSI^b are the base functions at nodes b
> > >
> > > - U_a are the a components of velocity
> > >
> > > In my program, I have the product RHO*U in a (nb_dof x 3) array, and I
> > > construct my matrix like this
> > >
> > > D = gf.asm_volumic('a=data(#2); M(#1,#1)+=
> > > sym(comp(Grad(#1).Base(#1).Base(#1))(:,i,:,k).a(i,k))',mim,mf_u,mf_d,DA
> > >TA)
> > >
> > > where mf_u is
> > >
> > > mf_u = gf.MeshFem(m,1)
> > > mf_u.set_fem(gf.Fem("FEM_PK(3,1)"))
> > >
> > > and mf_d
> > >
> > > mf_d = gf.MeshFem(m,3)
> > > md_d.set_fem(gf.Fem("FEM_PK(3,1)"
> > >
> > > My questions are these
> > >
> > > -> Is it the correct way to solve a transport equation ?
> > > -> Is anybody have an exemple of such equation ?
> > > -> With the exemple above, I get the following error that I don't
> > > understand, is there somebody who can explain it to me ?
> > >
> > > "wrong number of indexes for the 2th argument of the reduction
> > > comp(Grad(#1).Base(#1).Base(#1))(:,i,:,k).a(i,k) (ranges=[0..12])"
> > >
> > > Thanks a lot for your help,
> > >
> > > Best regards,
> > >
> > > Sébastien Janas
> > >
> > >
> > > _______________________________________________
> > > Getfem-users mailing list
> > > address@hidden
> > > https://mail.gna.org/listinfo/getfem-users
--
Yves Renard (address@hidden) tel : (33) 04.72.43.87.08
Pole de Mathematiques, INSA-Lyon fax : (33) 04.72.43.85.29
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------