From: Paul T. B. <ptb...@gm...> - 2019-05-24 14:53:31
|
On Fri, May 24, 2019 at 10:44 AM Nikrouz <nik...@gm...> wrote: > Thank you for your answer, I will try to apply what you said in my case. > > A basic question, what is the difference between plain examples and > FEMSystem examples totally? > FEMSystem is a framework within libMesh to facilitate constructing FEM programs. So things like constructing the finite element objects, looping over elements (and the parallelism therein) are all handled behind the scenes and you just provide element-wise evaluations. GRINS ( https://grinsfem.github.io) is built on this and we have a paper on it ( https://epubs.siam.org/doi/abs/10.1137/15M1026110). My suggestion would be to start with the "plain" examples since that gives you the most flexibility to do exactly what you want to do and can get you started and then if you're interested, we can help you migrate to FEMSystem. But that's just a suggestion. Let us know if we can answer more questions. Best, Paul > Thank you again for your guidance. > On 2019-05-24 8:47 a.m., Paul T. Bauman wrote: > > Hello, > > On Thu, May 23, 2019 at 3:45 PM Nikrouz <nik...@gm...> wrote: > >> Dear All libMesh uses, >> >> I want to apply traction boundary condition on two of the surfaces of my >> geometry. As far as I know, There are two methods >> >> for defining such a boundary condition: *Using penalty method* > > > The penalty method is used for enforcing Dirichlet boundary conditions. > > >> and >> *side_time_derivative method*. > > > This is correct, but it is used within the FEMSystem framework. You'd want > to refer to the fem_system examples in this case. > > >> I have a couple of questions: >> >> >> 1- Which method is more straightforward for defining boundary >> condition(traction) in libMesh? >> > > Please have a look at the following example: > https://github.com/libMesh/libmesh/blob/master/examples/systems_of_equations/systems_of_equations_ex6/systems_of_equations_ex6.C > > It is a "plain" (non FEMSystem) example. If you look in the assemble() > function, you will see that following the element interior loop, there is a > loop over boundary elements and then the traction is applied appropriately. > > HTH, > > Paul > > >> 2- I have searched different examples in libMesh and I could not find >> any case that has used side_time_derivative method(for example defined >> in fem-ex3). Is there any example illustrates how can I call the >> mentioned method in the code? Where should I call it?How? >> >> In the example fem3 example, the method need two inputs: >> >> *bool ElasticitySystem::side_time_derivative (bool request_jacobian,** >> ** DiffContext & context)* >> >> *FEMContext & c = cast_ref<FEMContext &>(context); >> >> // If we're on the correct side, apply the traction >> if (c.has_side_boundary_id(BOUNDARY_ID_MAX_X)) >> { >> * >> >> *......* >> >> >> How and where should I use this method in the code to have a traction >> boundary condition? >> >> Thank you everybody! >> >> >> _______________________________________________ >> Libmesh-users mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users >> > |