coefficient as a function of position

12 views
Skip to first unread message

Xi Tan

unread,
Oct 9, 2018, 12:23:57 PM10/9/18
to zapdos-users
Hi,

I tried to define coefficients such as rate constant as a function of position x. I found that in Auxkernels/Position.C, the position is defined as (*_current_node)(0)/_r_units or _q_point[_qp](0)/_r_units. But in Gas.C I cannot use _current_node since it is not available in material.h. Could anyone help me to figure this out? How can I obtain the value of position x in Gas.C? 

Many Thanks!

Xi

Casey Icenhour

unread,
Oct 9, 2018, 12:42:34 PM10/9/18
to zapdos...@googlegroups.com
Hi Xi,

While the Material class doesn't seem to have access to _current_node, it does have _q_point. So to obtain position x you would use _q_point[_qp](0) (or _q_point[_qp](0) / _r_units if you were scaling your units). Since you stated this form in your original message, does _q_point[_qp](0) not work for you?

FYI the MOOSE Material class source code is documented in the MOOSE doxygen: http://www.mooseframework.org/docs/doxygen/moose/classMaterial.html

Best,
Casey

--
You received this message because you are subscribed to the Google Groups "zapdos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zapdos-users...@googlegroups.com.
To post to this group, send email to zapdos...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zapdos-users/3591ee0a-bbd3-42ee-9164-734aeb6720b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xi Tan

unread,
Oct 17, 2018, 8:25:46 AM10/17/18
to zapdos-users
Hi, Casey,

I now understand more about MOOSE Material class, and I tried just using  _q_point[_qp](0) / _r_units and it works, thank you so much for your help!

Best,
Xi
Reply all
Reply to author
Forward
0 new messages