[Libmesh-users] Example 11

 [Libmesh-users] Example 11 From: Christopher Petrovitch - 2011-10-09 17:06:09 ```Hello, I was wondering how you would go about setting pressure boundary conditions in example 11. I followed the method used in the example and the program segfaults, which I suppose it should since the loop is over a Quad9, and pressure is setup to be a first order approximation. So, setting pressure to a second order approximation fixed the seg fault, its isn't an ideal solution. Is there a way to test if a node is on the first order nodes of a second order element, or perhaps a some other method? Basically, what I want to to do is set wall BC's (u=v=0) and setup a pressure difference for inflow/outflow to mimic what we do in our lab. Thanks, Chris ```

 [Libmesh-users] Example 11 From: Christopher Petrovitch - 2011-10-09 17:06:09 ```Hello, I was wondering how you would go about setting pressure boundary conditions in example 11. I followed the method used in the example and the program segfaults, which I suppose it should since the loop is over a Quad9, and pressure is setup to be a first order approximation. So, setting pressure to a second order approximation fixed the seg fault, its isn't an ideal solution. Is there a way to test if a node is on the first order nodes of a second order element, or perhaps a some other method? Basically, what I want to to do is set wall BC's (u=v=0) and setup a pressure difference for inflow/outflow to mimic what we do in our lab. Thanks, Chris ```
 Re: [Libmesh-users] Example 11 From: Kirk, Benjamin (JSC-EG311) - 2011-10-09 20:34:14 ```Since a node is a DofObject you can ask it if it has any components for a particular variable of a particular system. If the number of components is 0 you obviously can't set anything. -Ben On Oct 9, 2011, at 12:06 PM, "Christopher Petrovitch" wrote: > Hello, > > I was wondering how you would go about setting pressure boundary conditions in example 11. I followed the method used in the example and the program segfaults, which I suppose it should since the loop is over a Quad9, and pressure is setup to be a first order approximation. So, setting pressure to a second order approximation fixed the seg fault, its isn't an ideal solution. Is there a way to test if a node is on the first order nodes of a second order element, or perhaps a some other method? > > Basically, what I want to to do is set wall BC's (u=v=0) and setup a pressure difference for inflow/outflow to mimic what we do in our lab. > > Thanks, > > Chris > > > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2dcopy2 > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@... > https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] Example 11 From: Christopher Petrovitch - 2011-10-09 23:55:58 ```Ok, that makes sense. So something like: if (elem->node(n) == side->node(ns) && side->get_node(ns)->n_vars(p_var)!=0) to set the pressure variable in example 11? Christopher Petrovitch cpetrovi@... On Oct 9, 2011, at 4:33 PM, Kirk, Benjamin (JSC-EG311) wrote: > Since a node is a DofObject you can ask it if it has any components for a particular variable of a particular system. If the number of components is 0 you obviously can't set anything. > > -Ben > > > On Oct 9, 2011, at 12:06 PM, "Christopher Petrovitch" wrote: > >> Hello, >> >> I was wondering how you would go about setting pressure boundary conditions in example 11. I followed the method used in the example and the program segfaults, which I suppose it should since the loop is over a Quad9, and pressure is setup to be a first order approximation. So, setting pressure to a second order approximation fixed the seg fault, its isn't an ideal solution. Is there a way to test if a node is on the first order nodes of a second order element, or perhaps a some other method? >> >> Basically, what I want to to do is set wall BC's (u=v=0) and setup a pressure difference for inflow/outflow to mimic what we do in our lab. >> >> Thanks, >> >> Chris >> >> >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2dcopy2 >> _______________________________________________ >> Libmesh-users mailing list >> Libmesh-users@... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] Example 11 From: Christopher Petrovitch - 2011-10-10 00:44:18 ```Ah, it seems I miss understood the function n_vars(). I believe this is whats needed. if (elem->node(n) == side->node(ns) && elem->get_node(n)->n_comp(0,p_var)!=0) Thanks! Chris On Oct 9, 2011, at 4:33 PM, Kirk, Benjamin (JSC-EG311) wrote: > Since a node is a DofObject you can ask it if it has any components for a particular variable of a particular system. If the number of components is 0 you obviously can't set anything. > > -Ben > > > On Oct 9, 2011, at 12:06 PM, "Christopher Petrovitch" wrote: > >> Hello, >> >> I was wondering how you would go about setting pressure boundary conditions in example 11. I followed the method used in the example and the program segfaults, which I suppose it should since the loop is over a Quad9, and pressure is setup to be a first order approximation. So, setting pressure to a second order approximation fixed the seg fault, its isn't an ideal solution. Is there a way to test if a node is on the first order nodes of a second order element, or perhaps a some other method? >> >> Basically, what I want to to do is set wall BC's (u=v=0) and setup a pressure difference for inflow/outflow to mimic what we do in our lab. >> >> Thanks, >> >> Chris >> >> >> >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2dcopy2 >> _______________________________________________ >> Libmesh-users mailing list >> Libmesh-users@... >> https://lists.sourceforge.net/lists/listinfo/libmesh-users ```
 Re: [Libmesh-users] Example 11 From: Roy Stogner - 2011-10-10 00:45:41 ``` On Sun, 9 Oct 2011, Christopher Petrovitch wrote: > Ah, it seems I miss understood the function n_vars(). I believe this is whats needed. > > if (elem->node(n) == side->node(ns) && elem->get_node(n)->n_comp(0,p_var)!=0) This looks more right, yes. --- Roy ```