Is it possible to read ascii files each time step and add them to "Visualization"?

Dear all,

I want to add a output variable(can be showed in Paraview) which is defined by myself.
For example, I’d like to read the ascii data per 1Myr, re-give value to each point and output. (for my post-data processing). The values will not affect the solver, just for output.
Is this possible to achieve this?
I think I should write a new plugin. Does anyone have information or suggestion about this? Any help is greatly appreciated.

Shaohui LIU

Dear Shaohui,

I think the easiest option could be to make your property a compositional field and to set its Compositional field methods input parameter appropriately. That way, it will show up in the output.

If your field did not change, you could simply read in your property through the ascii data initial composition plugin and set the Compositional field methods for that field to static. Since you do want to change it every 1 Myr, you could use the prescribed field method. With this method, you have to add a section to the material model that fills a specific additional material model output, called the PrescribedFieldOutputs, with the property you want (which can depend on time).

If the property you want to output has nothing to do with material properties, maybe you are right and this would be better as a separate plugin. You could make it a new Compositional field method and call it something like ascii data and then read in the ascii data file through it.

You just have to make sure that the material model you use does not use that field to compute any properties. Usually that can be done by setting the field type to generic through the parameter Types of fields, but I think we might not yet use this in all material models, so make sure that it actually does not affect the computation.

Best regards,

Dear Prof. @jdannberg

Thank you for your patient reply ! It’s very helpful for me.
My preliminary thought is to write a Postprocess plugin which can read ascii data per 1Myr and update static values. I think the Subsection Postprocess- Visualization will not participate in the calculation of stokes and temperature equation.
I don’t know whether it’s more simple to achieve this by “prescribed field”, it’s difficult for me to use “prescribed field” without more information or reference .prm files.But I think it’s more easy to find reference code about reading ascii data and to finish it.
Thanks for your reply. Your global 3d .prm also help me a lot. (I even star your repositories and follow your github ^-^). YOUR ARE REALLY NICE.

Shaohui LIU