[Getdp] Obtaining quantities during postprocessing
Bernhard Kubicek
bernhard.kubicek at arsenal.ac.at
Thu Nov 8 09:19:58 CET 2007
Dear Timothy,
I also had this problem.
The thing is, phi is a picewise linear function space. E as the first
derivative, is piceswise constant. Vec-grad E then is pretty much
everywhere zero, apart from jump distribution "functions" at element
boundaries. So that's why it is not very useful.
I think what I once tried finally worked. Hopefully, I will try it a bit
later and send a second mail.
IIRC, what you need to do, is to create a additional 3 scalar nodal
function spaces, for each component of the vector. Each shall equal one
component of E.
Galerkin [ Dof{ex},{ex}]
Galerkin [ -CompX[{d phi}],{ex}]
// this hopefully equals ex-(grad phi)_x=0
However, you have to resolve, as CompX is not part of the matrix, but
only of the right-hand-side vector (no Dof), using:
InitSolution[T];
GenerateJac[T]; SolveJac[T];
GenerateJac[T]; SolveJac[T];
SaveSolution[T];
Using a secondary solution might be even more efficient.
Very nice greetings,
Bernhard
On Wed, 2007-11-07 at 15:41 -0500, Timothy Atherton wrote:
> I have a problem to be solved in Getdp that is very simple from the
> point of view of the differential equation concerned --- it is merely
> Laplace's equation with a scalar potential phi. Indeed my mesh and
> solution are already obtained.
>
> However, I need to compute from the calculated field phi a rather
> complicated quantity. Defining by analogy to electrostatics E = -
> Grad phi, I wish to know (E . Grad) E or more explicitly:
>
> { Ex * Dx (Ex) + Ey * Dy(Ex) + Ez * Dz(Ex), Ex * Dx (Ey) + Ey * Dy
> (Ey) + Ez * Dz(Ey), Ex * Dx (Ez) + Ey * Dy(Ez) + Ez * Dz(Ez) }
>
> where by Dx() I mean the x derivative and by Ex I mean the x
> component of E and similar.
>
> This is quite a complicated quantity so I tried to evaluate simpler
> parts in the Postprocessing part of the .pro file. In particular, I
> discovered I could not take multiple derivatives of fields:
>
> e.g. I could write in the postprocessing->Quantity clause
>
> { Name hdhy ; Value { Local {[ ********* ] ; In Domain ; Jacobian
> JVol ; } } }
>
> where the asterisks were
> {- Grad phi}
> or
> CompX[{Grad phi}]
>
> but not
> {CompX[-Grad phi]} ---- so I guess you can't use component
> expressions inside these field quantity brackets
>
> and moreover not
> {Grad CompX[-Grad phi]} or anything similar
>
> and surprisingly not even
> {Div Grad phi}
>
> So.... is there any way to calculate this sort of quantity (involving
> higher derivatives) without exporting the solution to an application
> such as Mathematica and constructing an interpolating function.
>
> I'd be very grateful for any advice.
>
> Dr Tim Atherton
> Dept of Physics
> Case Western Reserve University
>
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp