Another possibility is to use the FEMSystem framework, see fem_system
example 3 for example, specifically the ' bool
ElasticitySystem::side_time_derivative (bool request_jacobian, DiffContext
& context) ' function in elasticity_system.C.

This function takes in the unsteady contributions to the residual on the
boundary. The terms Fu(i), Fv(i) and so on are the residuals corresponding
to each variable in the system. If you have single variable C, you will
have something like:

FC(i) = JxW[qp]* ( P*( Cp(t) - C_t ) ) * phi[i][qp];

where you can obtain C_t at the current quadrature point using the side
value function:

Number C_t = ctxt.side_value(C_variable_number, qp);

On Mon, Jun 13, 2016 at 5:09 PM, John Peterson <jwpeter...@gmail.com> wrote:

> On Mon, Jun 13, 2016 at 2:43 PM, Ryan Woodall <rwood...@utexas.edu> wrote:
>
> > Hi everyone,
> >
> > I've got a problem where I'm try to implement 2 types of boundary
> > conditions on a FEM model. The first type of BC i have is a zero-flux BC,
> > which is pretty easy to implement. However, I'm also trying to implement
> > time-dependant Neumann BC's, and I'm not sure how to do that. They are
> > essentially of the following form:
> >
> > grad(C) = P*(C_p(t)-C(t))
> >
> > where P is a time-invariant constant, and C_p(t) is known at every time
> > step.
> >
>
> I think you left out the "dot n" on the left.
>
>
> >
> > I'm new to C++ and libmesh, so very basic level help would be the most
> > helpful.
> >
>
> There are several examples of how to do something similar to this in the
> examples.
>
> One is in examples/transient/transient_ex1.  There we are imposing a
> Dirichlet BC, but it's done weakly via a penalty by computing a surface
> integral contribution.  Look at the code around the "fe_face->reinit(elem,
> s);" line.
>
> --
> John
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Libmesh-users mailing list
> Libmesh-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libmesh-users
>



-- 
Vikram Garg
Postdoctoral Associate
Predictive Engineering and Computational Science (PECOS)
The University of Texas at Austin
http://web.mit.edu/vikramvg/www/

http://vikramvgarg.wordpress.com/
http://www.runforindia.org/runners/vikramg
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to