How to define the penalty parameter for the local Lux Friedrich flux? The value of the penalty parameter will depend on the exterior and interior edge for every edge and so it will be changed accordingly. How can we implement this type of parameter in free fem ++? I have also attached the flux. Please help me.
I understand that by “penalty parameter” you mean the numerical viscosity coefficient \Lambda_{K,e}. Since there is one coefficient for each edge, you could consider a function the the finite element space P0edge. If you want to compute this coefficient prior to using it, you have to make a loop over the triangles and their edges.
Or your can use a variational formulation as