From: Dafang Wang <dafang.wang@jh...>  20140305 04:24:00

Hi David, The two attached figures show the simulation of pressing an incompressible cube. A constant pressure was applied uniformly on the side y=y_min. Its opposite side, y=y_max, is the Dirichlet BC side, which is fixed in the y and z directions. That is, this side deforms only along the x axis. Both figures confirm this. The yellow frame depicts the undeformed object, whereas the colored cube depicts the deformed object. What is odd are two things: 1. I ran the same simulation code with a debug version of Libmesh and a release version, respectively. However, as the two figures show, the results are different: With the debug mode, the Dirichlet boundary side (y=y_max) is stretched toward the positivex direction; With the release mode, this side is stretched toward the negativex direction. 2. The Dirichlet boundary side (y=y_max) is supposed to deform evenly along both directions of the xaxis. However, in both figures, the deformation occurs mainly in one direction. Thanks very much for your help. Cheers, Dafang Date: Tue, 4 Mar 2014 18:47:51 0500 From: David Knezevic <dknezevic@...> Subject: Re: [Libmeshusers] Dirichlet Boundary Condition on Part of the Variables To: <libmeshusers@...> MessageID: <53166627.9080900@...> ContentType: text/plain; charset="ISO88591"; format=flowed Hi Dafang, I've done this a lot for elasticity problems, and haven't had any problems with it. If you can send through an example that illustrates what is happening (e.g. a modified version of systems_of_equations_ex6), I'd be happy to have a look. David On 03/04/2014 06:08 PM, Dafang Wang wrote: > Hi, > > The Libmesh Examples tell how to use the DirichletBoundary class to > constrain all the variables in a system, but I am not sure how to apply > zero Dirichlet BC to PART of the field variables in a system. I am > solving a simple 3D elastic problem and I want to fix a boundary in the > y direction while allowing it to move in the xz plane. > > I did the following way but the results did not seem correct: > My system has 3 displacement variables: ux (id=0), uy (id=1), and uz > (id=2). > std::vector<int> variables(1); > variables[0] = uy; //the vector contains uy only > DirichletBoundary bc(boundary_ids, variables, &ZeroFunction); > > The result I got showed that ux and uz were somewhat fixed with respect > to one edge on the Dirichlet boundary side, which made no sense since ux > and uz are supposed to evenly spread. > > Any suggestions will be greatly appreciated. > > Cheers, > Dafang  Dafang Wang, Ph.D Postdoctoral Fellow Institute of Computational Medicine Department of Biomedical Engineering Johns Hopkins University Hackerman Hall Room 218 Baltimore, MD, 21218 