← Back to team overview

dolfin team mailing list archive

Re: non linear viscosity && gmsh conversion revisited

 

On Mon, May 15, 2006 at 03:41:10PM +0000, Alexander Jarosch wrote:
> Thanks for the input Anders, I will make further testing and post 
> results on the list.
> 
> Some other thing I mentioned earlier in a mail is that a vertex is 
> missing if one is converting a gmsh msh file with the dolfin-convert in 
> 2d. here an example. The test.geo file would be:
> 
> Point(1) = {0,0,0,15};
> Point(2) = {3000,0,0,15};
> Point(3) = {3000,200,0,15};
> Point(4) = {0,200,0,15};
> Line(1) = {2,1};
> Line(2) = {1,4};
> Line(3) = {4,3};
> Line(4) = {3,2};
> Line Loop(5) = {3,4,1,2};
> Plane Surface(6) = {5};
> Physical Surface(7) = {6};
> 
> and if I mesh it with gmsh, ver. 1.64.0 like that
> 
> #  gmsh test.geo -2 -clscale 1.0 -o test.msh
> 
> and than run
> 
> #  dolfin-convert test.msh test.xml
> 
> the vertex with the corner points nr. 597, 1123 and 2045 is missing.
> 
> can anyone reproduce that problem?
> 
> cheers,
> 
> Alex

I don't get any triangle with vertices (597, 1123, 2045) in test.msh:

logg@gwaihir:~/tmp$ cat test.msh | grep 597 | grep 1123
logg@gwaihir:~/tmp$ 

I have gmsh 1.61.3.

Post your test.msh and I'll take a look when I get a chance.

/Anders


> Anders Logg wrote:
> 
> >On Fri, May 12, 2006 at 11:51:16AM +0000, Alexander Jarosch wrote:
> > 
> >
> >>Hello everybody,
> >>
> >>I try to do a non linear viscous Stokes problem and I use this ffc form :
> >>
> >>elementE = FiniteElement("Vector Lagrange", "triangle", 1, 3)
> >>elementU = FiniteElement("Vector Lagrange", "triangle", 1)
> >>
> >>
> >>v = TestFunction(elementE)  # test function
> >>e = TrialFunction(elementE)  # strain (to be computed)
> >>u = Function(elementU)       # displacement
> >>
> >>def normal_strain(u): # eps_xx    eps_yy             eps_xy
> >>  return [u[0].dx(0), u[1].dx(1), 0.5*(u[0].dx(1) + u[1].dx(0))]
> >>
> >>a = dot(v, e)*dx
> >>L = dot(v, normal_strain(u))*dx
> >>
> >>to get my strain rates from the velocity field coming out of the stokes 
> >>problem. Than use these strain rates to calculate new viscosities and 
> >>iterate the stokes problem until I converge to a non linear fluid. But 
> >>somehow the approach is not stable and the strain rates seems to go 
> >>wrong already after the initial stokes solution.
> >>
> >>Did anybody try something similar and maybe can give me some tips on how 
> >>to do a better approach?
> >>
> >>Thanks for any suggestions,
> >>
> >>Alex
> >>   
> >>
> >
> >There is a demo in src/demo/pde/elasticity/ for post-processing of
> >strain rates which computes both the normal and the shear strains.
> >Maybe you could compare with that demo to find out what goes wrong?
> >
> >Your variational problem looks ok and should compute the projection of
> >[u[0].dx(0), u[1].dx(1), 0.5*(u[0].dx(1) + u[1].dx(0))].
> >
> >Another thing you could experiment with is to project onto
> >discontinuous Lagrange. I think I remember I got unexpected results
> >when I experimented with something similar a while ago and projected
> >onto linears.
> >
> >/Anders
> >
> >_______________________________________________
> >DOLFIN-dev mailing list
> >DOLFIN-dev@xxxxxxxxxx
> >http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev
> >
> > 
> >
> 
> 



Follow ups

References