Adding SUPG

9 views
Skip to first unread message

Shane Keniley

unread,
Mar 26, 2020, 7:23:31 PM3/26/20
to zapdos-users
Starting with the navier-stokes module and the work that Corey had already done (https://github.com/csdechant/zapdos/tree/WorkInProgress), I'm starting to take a look at adding SUPG to Zapdos. I think I have a basic implementation working with just the EFieldAdvection term. Unless I'm mistaken, our form looks almost identical to the one derived by Andrea Rovinelli in this thread: 

with the major difference being that our velocity term is \mu * -_grad_potential. Based on the equations shown in Andrea's post, we need to take the divergence of the advective flux term. My first question about SUPG concerns that term: do we need to take the gradient of \mu into account

The second derivative of the potential and the derivative of the nonlinear variable are easy to include, but \mu is a bit more complicated. For electrons this is an interpolated quantity, so we need to explicitly describe derivative terms in the ADMaterial via the chain rule. I think I'm taking the gradient correctly. It looks like this: 

for (unsigned int component = 0; component < 3; ++component)
{
    _grad_muem
[_qp](component).value() = _mu_interpolation.sampleDerivative(std::exp(_mean_en[_qp].value() - _em[_qp].value())) *
                      std
::exp(_mean_en[_qp].value() - _em[_qp].value()) *
                     
(_grad_mean_en[_qp](component).value() - _grad_em[_qp](component).value()) * _voltage_scaling;
}

It looks ugly, and the derivative of that with respect to the nonlinear variables is even uglier. Am I approaching this correctly? 


Thanks,
Shane

Corey DeChant

unread,
Mar 26, 2020, 7:38:41 PM3/26/20
to zapdos-users
Good afternoon,

When I was looking at SUPG for plasmas , yes, we needed to take the derivative of mu into account. For the example problem I was using at the time, I assumed a consent mu (just to make it simple to see if everything else worked first), but to has a full working plasma SUPG for Zapdos, I think you need to take the derivative of mu.

Thank you,
Corey DeChant
Reply all
Reply to author
Forward
0 new messages