WorkFlows - 2019 - spring

General discussion about Elmer
NJank
Posts: 85
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: WorkFlows - 2019 - spring

Post by NJank » 08 Mar 2019, 01:12

mainly working on something like the example over in contributed cases here:
viewtopic.php?f=18&t=2193#p20222

For a steady state case, adding the following to the Simulation block :

Code: Select all

  Post File = file "adapt.vtu"
  Scalar Field 1 = String "Temperature" 
  Output Directory = file "vtufolder"  
Without mesh refinement, it puts a series of adapt000#.vtu files in vtufolder. Without the Output Directory keyword, they're in the adapt (mesh) folder. I assume that the multiple files are after each steady state iteration.

Without mesh refinement, without the Output Directory keyword, it scatters some RefinedMesh####.vtu files in the individual folders. in the main mesh folder, it saves a series of vtu files overlayed on the original mesh. With the Output Directory keyword, all of those same files are all put in the vtufolder. So there are two sets, one overlayed on the original mesh, one based on the refined meshes. All good.

However, the naming convention is odd and doesn't work with Paraview. E.g., the files in the vtu folder are:

Code: Select all

adapt0001.vtu
adapt_adapt0002.vtu
adapt_adapt0003.vtu
adapt_adapt0004.vtu
adapt_adapt0005.vtu
RefinedMesh1_adapt0002.vtu
RefinedMesh2_adapt0003.vtu
RefinedMesh3_adapt0004.vtu
RefinedMesh4_adapt0005.vtu
Paraview uses the root of the file to identify a group, and has a few numbering filters to determine sequence indicators. But the first file doesn't start with "adapt_", paraview sees it as separate from the "adapt_adapt0002.vtu ..." group. The RefinedMesh files all look independent to Paraview, and it cannot display them as a group. Also, cases needing more than 9 refinements reuse the earlier folders, so I assume they would be out of order. (verified below)


If I change the simulation type to transient, using the following Simulation block:

Code: Select all

Simulation
  Max Output Level = 5
  Coordinate System = "Cartesian 2D"
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = "Transient"
  Timestep Sizes(1) = .000005
  Timestep Intervals(1) = 20
  Timestepping Method = BDF
  BDF Order = 1
  
  Solver Input File = adapt.sif
  Post File = file "adapt.vtu"
  Steady State Max Iterations = 10
  Scalar Field 1 = String "Temperature" 
  Output Directory = file "vtufolder" 
End
and no Adaptive refinement, it puts the 20 vtu files in vtufolder as expected, numbered as "adapt0001.vtu, adapt0002.vtu, ..."

With adaptive refinement, the vtufolder is filled with:

Code: Select all

03/07/2019  04:53 PM            11,693 adapt_adapt0001.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0002.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0003.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0004.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0005.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0006.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0007.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0008.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0009.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0010.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0011.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0012.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0013.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0014.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0015.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0016.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0017.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0018.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0019.vtu
03/07/2019  04:53 PM            11,693 adapt_adapt0020.vtu
03/07/2019  04:53 PM           131,127 RefinedMesh0_adapt0010.vtu
03/07/2019  04:53 PM           111,166 RefinedMesh1_adapt0007.vtu
03/07/2019  04:53 PM           180,759 RefinedMesh1_adapt0015.vtu
03/07/2019  04:53 PM           180,759 RefinedMesh1_adapt0016.vtu
03/07/2019  04:53 PM            89,604 RefinedMesh2_adapt0001.vtu
03/07/2019  04:53 PM           153,967 RefinedMesh2_adapt0011.vtu
03/07/2019  04:53 PM           181,111 RefinedMesh2_adapt0017.vtu
03/07/2019  04:53 PM           181,111 RefinedMesh2_adapt0018.vtu
03/07/2019  04:53 PM           108,612 RefinedMesh3_adapt0002.vtu
03/07/2019  04:53 PM           108,612 RefinedMesh3_adapt0003.vtu
03/07/2019  04:53 PM           181,287 RefinedMesh3_adapt0019.vtu
03/07/2019  04:53 PM           181,287 RefinedMesh3_adapt0020.vtu
03/07/2019  04:53 PM           113,574 RefinedMesh4_adapt0008.vtu
03/07/2019  04:53 PM           169,135 RefinedMesh5_adapt0012.vtu
03/07/2019  04:53 PM           118,390 RefinedMesh7_adapt0009.vtu
03/07/2019  04:53 PM           176,279 RefinedMesh7_adapt0013.vtu
03/07/2019  04:53 PM           110,109 RefinedMesh8_adapt0004.vtu
03/07/2019  04:53 PM           110,109 RefinedMesh8_adapt0005.vtu
03/07/2019  04:53 PM           110,109 RefinedMesh8_adapt0006.vtu
03/07/2019  04:53 PM           179,263 RefinedMesh9_adapt0014.vtu
the reuse of the refinedmesh folders breaks the grouping and puts the timesteps quite out of order. to display in paraview I would need to use some manual scripting to rename everything after solving, as manual renaming would get quite cumbersome for long simulations.

for reference I attached the grd and sif files from the link above, modified as they were used here.

grd file:
adapt.grd
adaptive meshing grd file
(585 Bytes) Downloaded 17 times
sif file:
adapt.sif
adaptive meshing, transient, with vtu sif file
(1.66 KiB) Downloaded 15 times

NJank
Posts: 85
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: WorkFlows - 2019 - spring

Post by NJank » 08 Mar 2019, 01:20

I think previously this wasn't a problem because within the ResultOutputSolver block I would use

Output File Name = file "vtufile."

and i think that forced use of that filename instead of the RefinedMesh name? not certain.

I added that line to the simulation block and got the following runtime error during the mesh refinement step:

Code: Select all

RefineMesh: ----------- M E S H   R E F I N E M E N T --------------
RefineMesh: The new mesh consists of:
RefineMesh:          893  nodal points
RefineMesh:         1700  bulk elements
RefineMesh:           24  boundary elements
At line 11589 of file c:/ElmerBuild/src/elmer/elmerfem/fem/src/MeshUtils.F90 (unit = 1, file = '╪')
Fortran runtime error: File './RefinedMesh1/mesh.header' does not exist

NJank
Posts: 85
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: WorkFlows - 2019 - spring

Post by NJank » 08 Mar 2019, 01:37

my suggestion would be that it's of little use to include the RefinedMesh# at the front of the filename. the reuse of folders renders that information fairly useless once # > 9. if a simple defined filename could be specified for the refined vtu files it would help. Or if there was a different default naming scheme it would be a non-issue. if it needs to be distinguishable from the vtu files without the 'refinedmesh', perhaps just appending 'refinedmesh' with no folder number would work (I assume it's using folder location to build the name. this could be replaced by a fixed string). I don't know of any case where this would cause a name collision as long as step numbering is consistent.

NJank
Posts: 85
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: WorkFlows - 2019 - spring

Post by NJank » 08 Mar 2019, 19:20

I probably should have split this off into a new topic.

I thought maybe creating the pvd files would allow paraview to stitch together the transient run data, but I'm getting either getting nothing or a runtime error trying to do so.

if I add "Vtu Time Collection = logical true" in the simulation block, there is no change to behavior. if as I now see in the selvers manual I add "vtu: Vtu Time Collection = logical true", it creates some pvd files, but after a couple steps I get:

Code: Select all

ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
At line 2216 of file c:/ElmerBuild/src/elmer/elmerfem/fem/src/modules/ResultOutputSolve/VtuOutputSolver.F90 (unit = 58, file = '')
Fortran runtime error: File 'vtufolder/RefinedMesh3_adapt.pvd' does not exist"
files in the vtu folder are:

Code: Select all

03/08/2019  11:20 AM               288 adapt_adapt.pvd
03/08/2019  11:20 AM            11,693 adapt_adapt0001.vtu
03/08/2019  11:20 AM               312 RefinedMesh2_adapt.pvd
03/08/2019  11:20 AM            89,604 RefinedMesh2_adapt0001.vtu
03/08/2019  11:20 AM           108,612 RefinedMesh3_adapt0002.vtu

NJank
Posts: 85
Joined: 05 Dec 2009, 00:05
Location: Baltimore, MD, USA

Re: WorkFlows - 2019 - spring

Post by NJank » 08 Mar 2019, 20:28

note - created thread in Bug report forum
http://elmerfem.org/forum/viewtopic.php?f=16&t=6607

Post Reply