This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

SUPG stabilization

–1 vote

Hi Chris

Thanks for the hint. I got the idea!
Now, I define my stabilization parameter tau as follows:

h = CellSize(mesh)
tau = Function(V)
tau = pow((vnorm/h)**2 + (k/h**2)**2,-0.5)

and insert tau in the variational form. Is this the correct way to proceed? Does the JIT compiler understands what I mean?

Thanks in advance

Heitor

related to an answer for: SUPG stabilization
asked Sep 18, 2013 by hpina FEniCS Novice (140 points)
edited Sep 19, 2013 by chris_richardson

Normally, you should add any comments to the original question, instead of making a new one with the same title...

In answer to your question, you do not need to make tau into a Function, it should just be a UFL expression, which depends on the Function "velocity". In the advection-diffusion example,
tau is h/(2.0*vnorm) on line 79. Of course, this does not work well if v is close to zero.

Not all expressions are valid in UFL, so it may be necessary to rewrite somehow, but you can look at other examples to see what is possible.

...