From 57527aba4fe22177a32fb3be88756c86df80e564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Ospina=20De=20Los=20R=C3=ADos?= Date: Tue, 19 Mar 2019 16:28:24 +0100 Subject: [PATCH] [Transport] Make optional the dispersion write --- doc/default_files/transport-parameters.xml | 10 ++++++++++ dune/dorie/model/transport/transport.cc | 9 +++++++-- test/const_solute.mini.in | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/doc/default_files/transport-parameters.xml b/doc/default_files/transport-parameters.xml index 595931f2..35d95f2f 100644 --- a/doc/default_files/transport-parameters.xml +++ b/doc/default_files/transport-parameters.xml @@ -67,6 +67,16 @@ adding an empty line, make text **bold** or ``monospaced``. endOfTransportStep, endOfRichardsStep, none + + Defines whether VTK files should include the hydrodynamic + dispersion tensor. Tensors are written in 3D and have 9 componentents + independently of the world dimension. This can be easily be visualizated + in Paraview with the ``Tensor Glyph`` filter. + + true, false + false + + Plot VTK files with virtually refined grids. VTK only supports bilinear triangulations and displays higher-order solutions diff --git a/dune/dorie/model/transport/transport.cc b/dune/dorie/model/transport/transport.cc index b9e0e729..eb40604d 100644 --- a/dune/dorie/model/transport/transport.cc +++ b/dune/dorie/model/transport/transport.cc @@ -229,7 +229,9 @@ void TransportSimulation::write_data () const vtkwriter->template addVertexData(get_solute(),"solute"); vtkwriter->template addVertexData(get_total_solute(),"total_solute"); vtkwriter->template addVertexData(peclet,"micro_peclet"); - vtkwriter->template addVertexData(d_hd,"eff_hd_dispersion"); + + if (inifile.get("output.writeDispersionTensor")) + vtkwriter->template addVertexData(d_hd,"eff_hd_dispersion"); if constexpr (enable_rt_engine) if (enable_fluxrc) { @@ -241,7 +243,10 @@ void TransportSimulation::write_data () const vtkwriter->template addCellData(get_solute(),"solute"); vtkwriter->template addCellData(get_total_solute(),"total_solute"); vtkwriter->template addCellData(peclet,"micro_peclet"); - vtkwriter->template addCellData(d_hd,"eff_hd_dispersion"); + + if (inifile.get("output.writeDispersionTensor")) + vtkwriter->template addCellData(d_hd,"eff_hd_dispersion"); + if constexpr (enable_rt_engine) if (enable_fluxrc) { auto RT_name = "flux_RT" + std::to_string(flux_order); diff --git a/test/const_solute.mini.in b/test/const_solute.mini.in index 51e5ff98..c3d54c62 100644 --- a/test/const_solute.mini.in +++ b/test/const_solute.mini.in @@ -40,6 +40,7 @@ output.fileName = {__name} output.outputPath = {__name} output.vertexData = false output.policy = endOfRichardsStep +output.writeDispersionTensor = true boundary.file = "{_asset_path}/bcs/solute_2d_const.dat" -- GitLab