Two quick simple questions: creating a second time derivative kernel and a partial derivative kernel

165 views
Skip to first unread message

john.m...@uconn.edu

unread,
Jun 17, 2014, 5:38:03 PM6/17/14
to moose...@googlegroups.com
I'm looking to write a kernel that just takes a second time derivative \frac{\partial^2 u}{\partial t^2} and was a bit confused as to go about this. I would have to create a new TimeDerivative.h and TimeDerivative.C file right?

In a seperate issue I'm a bit stumped when I want to do something like \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} as well or mix the derivatives \frac{\partial^2 u}{\partial x \partial y}. The introductory material slide(78/313) with (Some) values available to Kernels does not have a partial derivative with respect to one spatial variable listed but does say there are more options available. Is there a full list somewhere?

Thanks for the help.

John Mangeri
Graduate Student
University of Connecticut

Daniel Schwen

unread,
Jun 17, 2014, 5:40:50 PM6/17/14
to moose...@googlegroups.com
An alternative to creating a d^2/dt^2 kernel (which may not even be
easily possible) would be to split your equation into two first order
time derivatives, coupled through a "velocity" variable.

Peterson, JW

unread,
Jun 17, 2014, 5:45:30 PM6/17/14
to moose-users
On Tue, Jun 17, 2014 at 3:38 PM, <john.m...@uconn.edu> wrote:
>
> In a seperate issue I'm a bit stumped when I want to do something like
> \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} as
> well or mix the derivatives \frac{\partial^2 u}{\partial x \partial y}. The
> introductory material slide(78/313) with (Some) values available to Kernels
> does not have a partial derivative with respect to one spatial variable
> listed but does say there are more options available. Is there a full list
> somewhere?

What equation are you solving, exactly?

If you actually need second derivatives, you might need to use C1 elements...

--
John

Derek Gaston

unread,
Jun 17, 2014, 6:07:58 PM6/17/14
to MOOSE
To see an example of doing the second derivative  in time you can look at moose/modules/solid_mechanics/src/kernels/SecondDerivativeImplicitEuler.C .  You can inherit from that and multiply by your own coefficients if you need to.

_grad_u is the spatial derivative of your unknown.  If you want just the "x" component of that it would be _grad_u[_qp](0) ... "y" is 1 and "z" is 2.  Normally... we don't access components like this though because we write everything in non-dimensional form.

You can get access to the second derivatives of your unknown with respect to space (x,y,z).  In order to do this you must do these things:

1.  Use shape functions that support higher derivatives (like THIRD order HERMITE ).

For an example of #2 look at  moose/modules/phase_field/src/kernels/CHInterface.C

Finally: What equations are you solving?  We may be able to point you to existing implementations that are similar that you can either use directly or work with those developers to modify to fit your needs.

Derek




--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANj%2BmwCO5gYpTA0zDBkk%2BousCgWodcTBxMobiiW3%3Dm8ZhDQgvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

john.m...@uconn.edu

unread,
Jun 18, 2014, 7:02:56 PM6/18/14
to moose...@googlegroups.com
Thank you Derek. The first solution was easily implemented. I was merely trying to create a wave equation example which worked out perfectly.

For the second problem I was trying to solve some elasticity equations(simple Hooke's law for a cube) but I've recently realized I can use kernels in the tensor_mechanics module instead of building the kernels myself. Is there any sort of documentation on implementing this module?

Andrew....@csiro.au

unread,
Jun 18, 2014, 8:03:58 PM6/18/14
to moose...@googlegroups.com
Hi John,

If you look in the tests (tensor mechanics tests, or combined tests) you will see some examples of linear elasticity.  Sorry I can’t specify more precisely - I’m in the middle of a meeting!

a


Tonks, Michael R

unread,
Jun 18, 2014, 11:15:14 PM6/18/14
to moose...@googlegroups.com
There is no documentation on the mooseframework.org wiki yet, but I will put some on soon. For now, I am attaching some slides on the tensor mechanics system that is part of the MARMOT training.

Mike





For more options, visit https://groups.google.com/d/optout.



--

*************************

Michael R. Tonks

Fuel Modeling and Simulation Department

Idaho National Laboratory

208-526-6319

michae...@inl.gov

tensor_mechanics_hndout.pdf

john.m...@uconn.edu

unread,
Jun 19, 2014, 12:52:24 AM6/19/14
to moose...@googlegroups.com
Excellent this is precisely what I was looking for.

Thanks!
John

Daniel Schwen

unread,
Jun 20, 2014, 3:17:41 PM6/20/14
to moose-users
An alternative to creating a d^2/dt^2 kernel (which may not even be
easily possible) would be to split your equation into two first order
time derivatives, coupled through a "velocity" variable.

On Tue, Jun 17, 2014 at 3:38 PM, <john.m...@uconn.edu> wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "moose-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to moose-users...@googlegroups.com.
> Visit this group at http://groups.google.com/group/moose-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/moose-users/bf15424a-d5f6-45c2-b71e-96de90b605b5%40googlegroups.com.

jamesowl

unread,
Mar 12, 2015, 3:50:49 PM3/12/15
to moose...@googlegroups.com
Hi,

I'm a new to MOOSE and I've also got questions about 2nd time derivative -- d^2 u / d t^2.

I'm splitting 2nd time derivative into two equations, coupled by a velocity variable "v"

d u / d t = v
d v / d t = ...

For this coupling, do I need to build a new TimeDerivative kernel that includes "coupling parameters" or "coupling in kernel" as those in Example03? or do I just use existing TimeDerivative kernel twice for each variable "u" and "v" in Kernel block in the input file?

Thanks in advance,
Xikai

Peterson, JW

unread,
Mar 12, 2015, 4:09:21 PM3/12/15
to moose-users
On Thu, Mar 12, 2015 at 1:50 PM, jamesowl <james...@gmail.com> wrote:
Hi,

I'm a new to MOOSE and I've also got questions about 2nd time derivative -- d^2 u / d t^2.

I'm splitting 2nd time derivative into two equations, coupled by a velocity variable "v"

d u / d t = v
d v / d t = ...

For this coupling, do I need to build a new TimeDerivative kernel that includes "coupling parameters" or "coupling in kernel" as those in Example03? or do I just use existing TimeDerivative kernel twice for each variable "u" and "v" in Kernel block in the input file?

I don't think you need to write new code to achieve what you want, as written these are both simply TimeDerivative kernels (one for u and one for v).
 
--
John

jamesowl

unread,
Mar 12, 2015, 4:18:43 PM3/12/15
to moose...@googlegroups.com
Hi John,

Thanks for your quick help. I'm just started to build my first application.

Xikai
Reply all
Reply to author
Forward
0 new messages