Topic: VTK export

Hi Borek!

I would like to export something other than my primary variable in my Darcy flow (the primary variable i the pressure the variable I would like to export is the velocity). How would I implement something like that?

/Carl

Re: VTK export

Carl, looking in internalstatetype.h i found
ENUM_ITEM_WITH_VALUE(IST_Velocity, 41)
So have something like this in the input file;
vtk tstep_all domain_all primvars 1 1 vars 1 41

However, it seems to be missing in
InternalStateValueType giveInternalStateValueType(InternalStateType type)
and should be added around line 144

But after that, I'm fairly lost when looking at the vtk export routine.

3

Re: VTK export

Dear Carl,

vtk export module can export primary  and internal variables. The primary variables are directly requested from the problem (class derived form EngngModel) using giveUnknownComponent method. If your variable is provided by the problem (like a velocity or acceleration of unknown) then it could be requested using the same mechanism.
On the other hand, if your variable is something, that is computed by element or material, then the mechanism for internal values should be used, as it passes the request to individual elements. The additional problem is that vtk requires to specify values at nodes, while the internal variables are rather computed at integration points. So vtk uses smoothing to bring the integration point values to nodes. So your element should implement support for one or more smoothing algorithms supported by oofem. The internal values are then requested using giveIPValue service, assisted by giveIPValueSize, giveIntVarCompFullIndx services.

To get more deep idea, how it works, I would suggest to create a simple input with vtk export (for mechanical analysis for example) and make some "high level" debugging of the code. Of course, I am ready to help.
Borek