"extrude" and "mesh_adaptivity" in flml file

Asked by liu chin chi

   I've used "/geometry/mesh::BaseMesh/from_mesh/extrude" , and get error message below when use with "mesh_adaptivity".
the flml code is also attached below, any comment is appreciated. thanks.

 Warning: asking for adjacency lists of discontinuous mesh
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
*** ERROR ***
Error message: InputMesh is not a mesh name in this state

%------ flml file ----

<?xml version='1.0' encoding='utf-8'?>
<fluidity_options>
  <simulation_name>
    <string_value lines="1">iwsink3d</string_value>
  </simulation_name>
  <problem_type>
    <string_value lines="1">fluids</string_value>
  </problem_type>
  <geometry>
    <dimension>
      <integer_value rank="0">3</integer_value>
    </dimension>
    <mesh name="CoordinateMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">1</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="VelocityMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">1</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <mesh_continuity>
          <string_value>discontinuous</string_value>
        </mesh_continuity>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="PressureMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">2</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="InputMesh">
      <from_file file_name="iwsink3d">
        <format name="triangle"/>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_file>
    </mesh>
    <mesh name="BaseMesh">
      <from_mesh>
        <mesh name="InputMesh"/>
        <extrude>
          <regions name="WholeMesh">
            <bottom_depth>
              <constant>
                <real_value rank="0">0.5</real_value>
              </constant>
            </bottom_depth>
            <sizing_function>
              <constant>
                <real_value rank="0">0.1</real_value>
              </constant>
            </sizing_function>
            <top_surface_id>
              <integer_value rank="0">5</integer_value>
            </top_surface_id>
            <bottom_surface_id>
              <integer_value rank="0">6</integer_value>
            </bottom_surface_id>
          </regions>
        </extrude>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <quadrature>
      <degree>
        <integer_value rank="0">4</integer_value>
      </degree>
    </quadrature>
    <ocean_boundaries>
      <top_surface_ids>
        <integer_value shape="1" rank="1">5</integer_value>
      </top_surface_ids>
      <bottom_surface_ids>
        <integer_value shape="1" rank="1">6</integer_value>
      </bottom_surface_ids>
      <scalar_field name="DistanceToTop" rank="0">
        <diagnostic>
          <algorithm name="Internal" material_phase_support="multiple"/>
          <mesh name="CoordinateMesh"/>
          <output/>
          <stat/>
          <convergence>
            <include_in_convergence/>
          </convergence>
          <detectors>
            <include_in_detectors/>
          </detectors>
          <steady_state>
            <include_in_steady_state/>
          </steady_state>
        </diagnostic>
      </scalar_field>
      <scalar_field name="DistanceToBottom" rank="0">
        <diagnostic>
          <algorithm name="Internal" material_phase_support="multiple"/>
          <mesh name="CoordinateMesh"/>
          <output/>
          <stat/>
          <convergence>
            <include_in_convergence/>
          </convergence>
          <detectors>
            <include_in_detectors/>
          </detectors>
          <steady_state>
            <include_in_steady_state/>
          </steady_state>
        </diagnostic>
      </scalar_field>
    </ocean_boundaries>
  </geometry>
  <io>
    <dump_format>
      <string_value>vtk</string_value>
    </dump_format>
    <dump_period_in_timesteps>
      <constant>
        <integer_value rank="0">2</integer_value>
      </constant>
    </dump_period_in_timesteps>
    <output_mesh name="CoordinateMesh"/>
    <stat/>
  </io>
  <timestepping>
    <current_time>
      <real_value rank="0">0.0</real_value>
    </current_time>
    <timestep>
      <real_value rank="0">0.05</real_value>
    </timestep>
    <finish_time>
      <real_value rank="0">1.0</real_value>
    </finish_time>
    <nonlinear_iterations>
      <integer_value rank="0">2</integer_value>
    </nonlinear_iterations>
  </timestepping>
  <physical_parameters>
    <gravity>
      <magnitude>
        <real_value rank="0">10.0</real_value>
      </magnitude>
      <vector_field name="GravityDirection" rank="1">
        <prescribed>
          <mesh name="CoordinateMesh"/>
          <value name="WholeMesh">
            <constant>
              <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value>
            </constant>
          </value>
          <output/>
          <stat>
            <exclude_from_stat/>
          </stat>
          <detectors>
            <exclude_from_detectors/>
          </detectors>
        </prescribed>
      </vector_field>
    </gravity>
  </physical_parameters>
  <material_phase name="Fluid">
    <equation_of_state>
      <fluids>
        <linear>
          <reference_density>
            <real_value rank="0">1.0</real_value>
          </reference_density>
          <salinity_dependency>
            <reference_salinity>
              <real_value rank="0">0.0</real_value>
            </reference_salinity>
            <saline_contraction_coefficient>
              <real_value rank="0">0.001</real_value>
            </saline_contraction_coefficient>
          </salinity_dependency>
          <subtract_out_hydrostatic_level/>
        </linear>
      </fluids>
    </equation_of_state>
    <scalar_field name="Pressure" rank="0">
      <prognostic>
        <mesh name="PressureMesh"/>
        <spatial_discretisation>
          <continuous_galerkin>
            <remove_stabilisation_term/>
            <integrate_continuity_by_parts/>
          </continuous_galerkin>
        </spatial_discretisation>
        <scheme>
          <poisson_pressure_solution>
            <string_value lines="1">never</string_value>
          </poisson_pressure_solution>
          <use_projection_method/>
        </scheme>
        <solver>
          <iterative_method name="cg"/>
          <preconditioner name="mg">
            <vertical_lumping/>
          </preconditioner>
          <relative_error>
            <real_value rank="0">1.0e-5</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">3000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <exclude_from_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <consistent_interpolation/>
      </prognostic>
    </scalar_field>
    <scalar_field name="Density" rank="0">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="VelocityMesh"/>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
      </diagnostic>
    </scalar_field>
    <vector_field name="Velocity" rank="1">
      <prognostic>
        <mesh name="VelocityMesh"/>
        <equation name="Boussinesq"/>
        <spatial_discretisation>
          <continuous_galerkin>
            <stabilisation>
              <no_stabilisation/>
            </stabilisation>
            <mass_terms>
              <lump_mass_matrix/>
            </mass_terms>
            <advection_terms/>
            <stress_terms>
              <tensor_form/>
            </stress_terms>
          </continuous_galerkin>
          <conservative_advection>
            <real_value rank="0">0.0</real_value>
          </conservative_advection>
        </spatial_discretisation>
        <temporal_discretisation>
          <theta>
            <real_value rank="0">0.5</real_value>
          </theta>
          <relaxation>
            <real_value rank="0">0.5</real_value>
          </relaxation>
        </temporal_discretisation>
        <solver>
          <iterative_method name="gmres">
            <restart>
              <integer_value rank="0">30</integer_value>
            </restart>
          </iterative_method>
          <preconditioner name="sor"/>
          <relative_error>
            <real_value rank="0">1.0e-6</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">3000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <initial_condition name="WholeMesh">
          <constant>
            <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
          </constant>
        </initial_condition>
        <boundary_conditions name="W_E_FreeSlipWall">
          <surface_ids>
            <integer_value shape="2" rank="1">1 2</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <x_component>
                <constant>
                  <real_value rank="0">0.0</real_value>
                </constant>
              </x_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="B_NoSlip">
          <surface_ids>
            <integer_value shape="1" rank="1">6</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <x_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </x_component>
              <y_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </y_component>
              <z_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </z_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="N_S_FreeSlipWall">
          <surface_ids>
            <integer_value shape="2" rank="1">3 4</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <y_component>
                <constant>
                  <real_value rank="0">0.0</real_value>
                </constant>
              </y_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="T_FreeSurface">
          <surface_ids>
            <integer_value shape="1" rank="1">5</integer_value>
          </surface_ids>
          <type name="free_surface"/>
        </boundary_conditions>
        <tensor_field name="Viscosity" rank="2">
          <prescribed>
            <value name="WholeMesh">
              <isotropic>
                <constant>
                  <real_value rank="0">5.0e-5</real_value>
                </constant>
              </isotropic>
            </value>
            <output/>
          </prescribed>
        </tensor_field>
        <output/>
        <stat>
          <include_in_stat/>
          <previous_time_step>
            <exclude_from_stat/>
          </previous_time_step>
          <nonlinear_field>
            <exclude_from_stat/>
          </nonlinear_field>
        </stat>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <adaptivity_options>
          <absolute_measure>
            <vector_field name="InterpolationErrorBound" rank="1">
              <prescribed>
                <value name="WholeMesh">
                  <constant>
                    <real_value shape="3" dim1="dim" rank="1">0.05 0.05 0.05</real_value>
                  </constant>
                </value>
                <output/>
                <stat>
                  <include_in_stat/>
                </stat>
                <detectors>
                  <exclude_from_detectors/>
                </detectors>
              </prescribed>
            </vector_field>
          </absolute_measure>
        </adaptivity_options>
        <consistent_interpolation/>
      </prognostic>
    </vector_field>
    <scalar_field name="Salinity" rank="0">
      <prognostic>
        <mesh name="VelocityMesh"/>
        <equation name="AdvectionDiffusion"/>
        <spatial_discretisation>
          <control_volumes>
            <face_value name="FiniteElement">
              <limit_face_value>
                <limiter name="Sweby">
                  <project_upwind_value_from_point>
                    <store_upwind_elements>
                      <store_upwind_quadrature/>
                    </store_upwind_elements>
                  </project_upwind_value_from_point>
                </limiter>
              </limit_face_value>
            </face_value>
            <diffusion_scheme name="ElementGradient"/>
          </control_volumes>
          <conservative_advection>
            <real_value rank="0">0.0</real_value>
          </conservative_advection>
        </spatial_discretisation>
        <temporal_discretisation>
          <theta>
            <real_value rank="0">0.5</real_value>
          </theta>
          <control_volumes>
            <number_advection_iterations>
              <integer_value rank="0">3</integer_value>
            </number_advection_iterations>
            <limit_theta/>
          </control_volumes>
        </temporal_discretisation>
        <solver>
          <iterative_method name="gmres">
            <restart>
              <integer_value rank="0">30</integer_value>
            </restart>
          </iterative_method>
          <preconditioner name="eisenstat"/>
          <relative_error>
            <real_value rank="0">1e-5</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">1000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <initial_condition name="WholeMesh">
          <python>
            <string_value lines="20" type="code" language="python">def val(X,t):
 if((X[0]&lt;=0.5 and X[2]&lt;=-0.2) or (X[0]&gt;0.5 and X[2]&lt;=-0.3)):
  return 35.0
 else:
  return 0.0</string_value>
          </python>
        </initial_condition>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <consistent_interpolation/>
      </prognostic>
    </scalar_field>
    <scalar_field name="FreeSurface" rank="0">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="PressureMesh"/>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
      </diagnostic>
    </scalar_field>
    <vector_field name="BedShearStress" rank="1">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="VelocityMesh"/>
        <density>
          <real_value rank="0">1.0</real_value>
        </density>
        <calculation_method>
          <drag_coefficient>
            <real_value rank="0">1e-3</real_value>
          </drag_coefficient>
        </calculation_method>
        <output/>
        <stat>
          <include_in_stat/>
        </stat>
        <detectors>
          <include_in_detectors/>
        </detectors>
      </diagnostic>
    </vector_field>
  </material_phase>
  <mesh_adaptivity>
    <hr_adaptivity>
      <period_in_timesteps>
        <integer_value rank="0">10</integer_value>
      </period_in_timesteps>
      <maximum_number_of_nodes>
        <integer_value rank="0">100000</integer_value>
      </maximum_number_of_nodes>
      <enable_gradation/>
      <tensor_field name="MinimumEdgeLengths">
        <anisotropic_symmetric>
          <constant>
            <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">0.05 0.0 0.0 0.0 0.05 0.0 0.0 0.0 0.05</real_value>
          </constant>
        </anisotropic_symmetric>
      </tensor_field>
      <tensor_field name="MaximumEdgeLengths">
        <anisotropic_symmetric>
          <constant>
            <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">0.4 0.0 0.0 0.0 0.4 0.0 0.0 0.0 0.4</real_value>
          </constant>
        </anisotropic_symmetric>
      </tensor_field>
    </hr_adaptivity>
  </mesh_adaptivity>
</fluidity_options>

Question information

Language:
English Edit question
Status:
Solved
For:
Fluidity Edit question
Assignee:
No assignee Edit question
Solved by:
liu chin chi
Solved:
Last query:
Last reply:
Revision history for this message
Ting Zhang (ting-zhang12) said :
#1

Have you tried extrusion without 'mesh_adaptivity'? It would be better to make sure it works before switching on 'mesh_adaptivity', I think. If it doesn't work, check the .geo and .msh file and make sure they are generated in the right way (see http://amcg.ese.ic.ac.uk/index.php?title=Local:Gmsh_tutorial). Good luck.

Ting Zhang
Royal School of Mines, Department of Earth Science and Engineering
Imperial College London,Prince Consort Road, South Kensington, London SW7 2BP
TEL: +(44)07451419611

________________________________________
From: <email address hidden> [<email address hidden>] on behalf of liu chin chi [<email address hidden>]
Sent: 24 October 2013 09:11
To: Zhang, Ting
Subject: [Question #237948]: "extrude" and "mesh_adaptivity" in flml file

New question #237948 on Fluidity:
https://answers.launchpad.net/fluidity/+question/237948

   I've used "/geometry/mesh::BaseMesh/from_mesh/extrude" , and get error message below when use with "mesh_adaptivity".
the flml code is also attached below, any comment is appreciated. thanks.

 Warning: asking for adjacency lists of discontinuous mesh
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
 Warning: Cannot interpolate field InputMeshCoordinate - no target
*** ERROR ***
Error message: InputMesh is not a mesh name in this state

%------ flml file ----

<?xml version='1.0' encoding='utf-8'?>
<fluidity_options>
  <simulation_name>
    <string_value lines="1">iwsink3d</string_value>
  </simulation_name>
  <problem_type>
    <string_value lines="1">fluids</string_value>
  </problem_type>
  <geometry>
    <dimension>
      <integer_value rank="0">3</integer_value>
    </dimension>
    <mesh name="CoordinateMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">1</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="VelocityMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">1</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <mesh_continuity>
          <string_value>discontinuous</string_value>
        </mesh_continuity>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="PressureMesh">
      <from_mesh>
        <mesh name="BaseMesh"/>
        <mesh_shape>
          <polynomial_degree>
            <integer_value rank="0">2</integer_value>
          </polynomial_degree>
        </mesh_shape>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <mesh name="InputMesh">
      <from_file file_name="iwsink3d">
        <format name="triangle"/>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_file>
    </mesh>
    <mesh name="BaseMesh">
      <from_mesh>
        <mesh name="InputMesh"/>
        <extrude>
          <regions name="WholeMesh">
            <bottom_depth>
              <constant>
                <real_value rank="0">0.5</real_value>
              </constant>
            </bottom_depth>
            <sizing_function>
              <constant>
                <real_value rank="0">0.1</real_value>
              </constant>
            </sizing_function>
            <top_surface_id>
              <integer_value rank="0">5</integer_value>
            </top_surface_id>
            <bottom_surface_id>
              <integer_value rank="0">6</integer_value>
            </bottom_surface_id>
          </regions>
        </extrude>
        <stat>
          <exclude_from_stat/>
        </stat>
      </from_mesh>
    </mesh>
    <quadrature>
      <degree>
        <integer_value rank="0">4</integer_value>
      </degree>
    </quadrature>
    <ocean_boundaries>
      <top_surface_ids>
        <integer_value shape="1" rank="1">5</integer_value>
      </top_surface_ids>
      <bottom_surface_ids>
        <integer_value shape="1" rank="1">6</integer_value>
      </bottom_surface_ids>
      <scalar_field name="DistanceToTop" rank="0">
        <diagnostic>
          <algorithm name="Internal" material_phase_support="multiple"/>
          <mesh name="CoordinateMesh"/>
          <output/>
          <stat/>
          <convergence>
            <include_in_convergence/>
          </convergence>
          <detectors>
            <include_in_detectors/>
          </detectors>
          <steady_state>
            <include_in_steady_state/>
          </steady_state>
        </diagnostic>
      </scalar_field>
      <scalar_field name="DistanceToBottom" rank="0">
        <diagnostic>
          <algorithm name="Internal" material_phase_support="multiple"/>
          <mesh name="CoordinateMesh"/>
          <output/>
          <stat/>
          <convergence>
            <include_in_convergence/>
          </convergence>
          <detectors>
            <include_in_detectors/>
          </detectors>
          <steady_state>
            <include_in_steady_state/>
          </steady_state>
        </diagnostic>
      </scalar_field>
    </ocean_boundaries>
  </geometry>
  <io>
    <dump_format>
      <string_value>vtk</string_value>
    </dump_format>
    <dump_period_in_timesteps>
      <constant>
        <integer_value rank="0">2</integer_value>
      </constant>
    </dump_period_in_timesteps>
    <output_mesh name="CoordinateMesh"/>
    <stat/>
  </io>
  <timestepping>
    <current_time>
      <real_value rank="0">0.0</real_value>
    </current_time>
    <timestep>
      <real_value rank="0">0.05</real_value>
    </timestep>
    <finish_time>
      <real_value rank="0">1.0</real_value>
    </finish_time>
    <nonlinear_iterations>
      <integer_value rank="0">2</integer_value>
    </nonlinear_iterations>
  </timestepping>
  <physical_parameters>
    <gravity>
      <magnitude>
        <real_value rank="0">10.0</real_value>
      </magnitude>
      <vector_field name="GravityDirection" rank="1">
        <prescribed>
          <mesh name="CoordinateMesh"/>
          <value name="WholeMesh">
            <constant>
              <real_value shape="3" dim1="dim" rank="1">0.0 0.0 -1.0</real_value>
            </constant>
          </value>
          <output/>
          <stat>
            <exclude_from_stat/>
          </stat>
          <detectors>
            <exclude_from_detectors/>
          </detectors>
        </prescribed>
      </vector_field>
    </gravity>
  </physical_parameters>
  <material_phase name="Fluid">
    <equation_of_state>
      <fluids>
        <linear>
          <reference_density>
            <real_value rank="0">1.0</real_value>
          </reference_density>
          <salinity_dependency>
            <reference_salinity>
              <real_value rank="0">0.0</real_value>
            </reference_salinity>
            <saline_contraction_coefficient>
              <real_value rank="0">0.001</real_value>
            </saline_contraction_coefficient>
          </salinity_dependency>
          <subtract_out_hydrostatic_level/>
        </linear>
      </fluids>
    </equation_of_state>
    <scalar_field name="Pressure" rank="0">
      <prognostic>
        <mesh name="PressureMesh"/>
        <spatial_discretisation>
          <continuous_galerkin>
            <remove_stabilisation_term/>
            <integrate_continuity_by_parts/>
          </continuous_galerkin>
        </spatial_discretisation>
        <scheme>
          <poisson_pressure_solution>
            <string_value lines="1">never</string_value>
          </poisson_pressure_solution>
          <use_projection_method/>
        </scheme>
        <solver>
          <iterative_method name="cg"/>
          <preconditioner name="mg">
            <vertical_lumping/>
          </preconditioner>
          <relative_error>
            <real_value rank="0">1.0e-5</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">3000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <exclude_from_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <consistent_interpolation/>
      </prognostic>
    </scalar_field>
    <scalar_field name="Density" rank="0">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="VelocityMesh"/>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
      </diagnostic>
    </scalar_field>
    <vector_field name="Velocity" rank="1">
      <prognostic>
        <mesh name="VelocityMesh"/>
        <equation name="Boussinesq"/>
        <spatial_discretisation>
          <continuous_galerkin>
            <stabilisation>
              <no_stabilisation/>
            </stabilisation>
            <mass_terms>
              <lump_mass_matrix/>
            </mass_terms>
            <advection_terms/>
            <stress_terms>
              <tensor_form/>
            </stress_terms>
          </continuous_galerkin>
          <conservative_advection>
            <real_value rank="0">0.0</real_value>
          </conservative_advection>
        </spatial_discretisation>
        <temporal_discretisation>
          <theta>
            <real_value rank="0">0.5</real_value>
          </theta>
          <relaxation>
            <real_value rank="0">0.5</real_value>
          </relaxation>
        </temporal_discretisation>
        <solver>
          <iterative_method name="gmres">
            <restart>
              <integer_value rank="0">30</integer_value>
            </restart>
          </iterative_method>
          <preconditioner name="sor"/>
          <relative_error>
            <real_value rank="0">1.0e-6</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">3000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <initial_condition name="WholeMesh">
          <constant>
            <real_value shape="3" dim1="dim" rank="1">0.0 0.0 0.0</real_value>
          </constant>
        </initial_condition>
        <boundary_conditions name="W_E_FreeSlipWall">
          <surface_ids>
            <integer_value shape="2" rank="1">1 2</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <x_component>
                <constant>
                  <real_value rank="0">0.0</real_value>
                </constant>
              </x_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="B_NoSlip">
          <surface_ids>
            <integer_value shape="1" rank="1">6</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <x_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </x_component>
              <y_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </y_component>
              <z_component>
                <constant>
                  <real_value rank="0">0.</real_value>
                </constant>
              </z_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="N_S_FreeSlipWall">
          <surface_ids>
            <integer_value shape="2" rank="1">3 4</integer_value>
          </surface_ids>
          <type name="dirichlet">
            <align_bc_with_cartesian>
              <y_component>
                <constant>
                  <real_value rank="0">0.0</real_value>
                </constant>
              </y_component>
            </align_bc_with_cartesian>
          </type>
        </boundary_conditions>
        <boundary_conditions name="T_FreeSurface">
          <surface_ids>
            <integer_value shape="1" rank="1">5</integer_value>
          </surface_ids>
          <type name="free_surface"/>
        </boundary_conditions>
        <tensor_field name="Viscosity" rank="2">
          <prescribed>
            <value name="WholeMesh">
              <isotropic>
                <constant>
                  <real_value rank="0">5.0e-5</real_value>
                </constant>
              </isotropic>
            </value>
            <output/>
          </prescribed>
        </tensor_field>
        <output/>
        <stat>
          <include_in_stat/>
          <previous_time_step>
            <exclude_from_stat/>
          </previous_time_step>
          <nonlinear_field>
            <exclude_from_stat/>
          </nonlinear_field>
        </stat>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <adaptivity_options>
          <absolute_measure>
            <vector_field name="InterpolationErrorBound" rank="1">
              <prescribed>
                <value name="WholeMesh">
                  <constant>
                    <real_value shape="3" dim1="dim" rank="1">0.05 0.05 0.05</real_value>
                  </constant>
                </value>
                <output/>
                <stat>
                  <include_in_stat/>
                </stat>
                <detectors>
                  <exclude_from_detectors/>
                </detectors>
              </prescribed>
            </vector_field>
          </absolute_measure>
        </adaptivity_options>
        <consistent_interpolation/>
      </prognostic>
    </vector_field>
    <scalar_field name="Salinity" rank="0">
      <prognostic>
        <mesh name="VelocityMesh"/>
        <equation name="AdvectionDiffusion"/>
        <spatial_discretisation>
          <control_volumes>
            <face_value name="FiniteElement">
              <limit_face_value>
                <limiter name="Sweby">
                  <project_upwind_value_from_point>
                    <store_upwind_elements>
                      <store_upwind_quadrature/>
                    </store_upwind_elements>
                  </project_upwind_value_from_point>
                </limiter>
              </limit_face_value>
            </face_value>
            <diffusion_scheme name="ElementGradient"/>
          </control_volumes>
          <conservative_advection>
            <real_value rank="0">0.0</real_value>
          </conservative_advection>
        </spatial_discretisation>
        <temporal_discretisation>
          <theta>
            <real_value rank="0">0.5</real_value>
          </theta>
          <control_volumes>
            <number_advection_iterations>
              <integer_value rank="0">3</integer_value>
            </number_advection_iterations>
            <limit_theta/>
          </control_volumes>
        </temporal_discretisation>
        <solver>
          <iterative_method name="gmres">
            <restart>
              <integer_value rank="0">30</integer_value>
            </restart>
          </iterative_method>
          <preconditioner name="eisenstat"/>
          <relative_error>
            <real_value rank="0">1e-5</real_value>
          </relative_error>
          <max_iterations>
            <integer_value rank="0">1000</integer_value>
          </max_iterations>
          <never_ignore_solver_failures/>
          <diagnostics>
            <monitors/>
          </diagnostics>
        </solver>
        <initial_condition name="WholeMesh">
          <python>
            <string_value lines="20" type="code" language="python">def val(X,t):
        if((X[0]&lt;=0.5 and X[2]&lt;=-0.2) or (X[0]&gt;0.5 and X[2]&lt;=-0.3)):
                return 35.0
        else:
                return 0.0</string_value>
          </python>
        </initial_condition>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
        <consistent_interpolation/>
      </prognostic>
    </scalar_field>
    <scalar_field name="FreeSurface" rank="0">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="PressureMesh"/>
        <output/>
        <stat/>
        <convergence>
          <include_in_convergence/>
        </convergence>
        <detectors>
          <include_in_detectors/>
        </detectors>
        <steady_state>
          <include_in_steady_state/>
        </steady_state>
      </diagnostic>
    </scalar_field>
    <vector_field name="BedShearStress" rank="1">
      <diagnostic>
        <algorithm name="Internal" material_phase_support="multiple"/>
        <mesh name="VelocityMesh"/>
        <density>
          <real_value rank="0">1.0</real_value>
        </density>
        <calculation_method>
          <drag_coefficient>
            <real_value rank="0">1e-3</real_value>
          </drag_coefficient>
        </calculation_method>
        <output/>
        <stat>
          <include_in_stat/>
        </stat>
        <detectors>
          <include_in_detectors/>
        </detectors>
      </diagnostic>
    </vector_field>
  </material_phase>
  <mesh_adaptivity>
    <hr_adaptivity>
      <period_in_timesteps>
        <integer_value rank="0">10</integer_value>
      </period_in_timesteps>
      <maximum_number_of_nodes>
        <integer_value rank="0">100000</integer_value>
      </maximum_number_of_nodes>
      <enable_gradation/>
      <tensor_field name="MinimumEdgeLengths">
        <anisotropic_symmetric>
          <constant>
            <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">0.05 0.0 0.0 0.0 0.05 0.0 0.0 0.0 0.05</real_value>
          </constant>
        </anisotropic_symmetric>
      </tensor_field>
      <tensor_field name="MaximumEdgeLengths">
        <anisotropic_symmetric>
          <constant>
            <real_value symmetric="true" dim2="dim" shape="3 3" dim1="dim" rank="2">0.4 0.0 0.0 0.0 0.4 0.0 0.0 0.0 0.4</real_value>
          </constant>
        </anisotropic_symmetric>
      </tensor_field>
    </hr_adaptivity>
  </mesh_adaptivity>
</fluidity_options>

--
You received this question notification because you are a member of
Fluidity Core Team, which is an answer contact for Fluidity.

Revision history for this message
liu chin chi (caite8001) said :
#2

Sir,

extrude without 'mesh_adaptivity'. it can worked,

extrude(created by Gmsh) with 'mesh_adaptivity' is also worked.

extrude(used option in flml) with 'mesh_adaptivity'. the model will stop at 10th time step and show the Error message.

I'm still a newbie. thank you for your patient.

the .geo file is attached below.
%--- iwsink3d.geo ---
Point (1) = {0.0, 0, 0, 0.2};
Point (2) = {3.0, 0, 0, 0.2};
Point (3) = {3.0, 1.0, 0, 0.2};
Point (4) = { 0, 1.0, 0, 0.2};

Line (1) = {1, 2};
Line (2) = {2, 3};
Line (3) = {3, 4};
Line (4) = {4, 1};

Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};
//Extrude {0,0,0.5} {
// Surface{6};
//}

// W
Physical Line(1) = {4};
// E
Physical Line(2) = {2};
// S
Physical Line(3) = {1};
// N
Physical Line(4) = {3};

Physical Surface(100) = {6};

Revision history for this message
Ting Zhang (ting-zhang12) said :
#3

From my experience, if the modelcan run several time steps, usually it is the problem in the setting up rather than the mesh file. Unfortunately, I am not familar with adaptive mesh. Other people may offer you help about this. Good luck!

发自我的 iPhone

在 2013-10-25,上午2:46,"liu chin chi" <email address hidden> 写道:

> Question #237948 on Fluidity changed:
> https://answers.launchpad.net/fluidity/+question/237948
>
> Status: Answered => Open
>
> liu chin chi is still having a problem:
> Sir,
>
> extrude without 'mesh_adaptivity'. it can worked,
>
> extrude(created by Gmsh) with 'mesh_adaptivity' is also worked.
>
> extrude(used option in flml) with 'mesh_adaptivity'. the model will
> stop at 10th time step and show the Error message.
>
> I'm still a newbie. thank you for your patient.
>
>
> the .geo file is attached below.
> %--- iwsink3d.geo ---
> Point (1) = {0.0, 0, 0, 0.2};
> Point (2) = {3.0, 0, 0, 0.2};
> Point (3) = {3.0, 1.0, 0, 0.2};
> Point (4) = { 0, 1.0, 0, 0.2};
>
> Line (1) = {1, 2};
> Line (2) = {2, 3};
> Line (3) = {3, 4};
> Line (4) = {4, 1};
>
> Line Loop(5) = {1,2,3,4};
> Plane Surface(6) = {5};
> //Extrude {0,0,0.5} {
> // Surface{6};
> //}
>
> // W
> Physical Line(1) = {4};
> // E
> Physical Line(2) = {2};
> // S
> Physical Line(3) = {1};
> // N
> Physical Line(4) = {3};
>
> Physical Surface(100) = {6};
>
> --
> You received this question notification because you are a member of
> Fluidity Core Team, which is an answer contact for Fluidity.

Revision history for this message
liu chin chi (caite8001) said :
#4

    I'll use "extrude" by Gmsh in stead of the flml option temporarily. Appreciate for your attention and comment.

Revision history for this message
Mark Goffin (m-goffin10) said :
#5

The calculation is failing during the interpolation after the adapt which is why it fails on the 10th timestep. This is just an idea, I'm not sure it will work but you could try excluding the InputMesh from adaptivity by turning on the option "exclude_from_mesh_adaptivity".

In addition you should probably be using a discontinuous Galerkin interpolation (vector_field::Velocity/prognostic/galerkin_projection ---> vector_field::Velocity/prognostic/galerkin_projection/discontinuous) for the velocity field because it is on a discontinuous mesh.

Revision history for this message
Ting Zhang (ting-zhang12) said :
#6

Thank you very much, Mark. I haven't used adaptive mesh before, but I need to use it in the very near future. So that's very useful for me and surely for Liu Chin Chi as well.
Ting Zhang
Royal School of Mines, Department of Earth Science and Engineering
Imperial College London,Prince Consort Road, South Kensington, London SW7 2BP
TEL: +(44)07451419611

________________________________________
From: <email address hidden> [<email address hidden>] on behalf of Mark Goffin [<email address hidden>]
Sent: 25 October 2013 10:56
To: Zhang, Ting
Subject: Re: [Question #237948]: "extrude" and "mesh_adaptivity" in flml file

Question #237948 on Fluidity changed:
https://answers.launchpad.net/fluidity/+question/237948

Mark Goffin posted a new comment:
The calculation is failing during the interpolation after the adapt
which is why it fails on the 10th timestep. This is just an idea, I'm
not sure it will work but you could try excluding the InputMesh from
adaptivity by turning on the option "exclude_from_mesh_adaptivity".

In addition you should probably be using a discontinuous Galerkin
interpolation (vector_field::Velocity/prognostic/galerkin_projection
--->
vector_field::Velocity/prognostic/galerkin_projection/discontinuous) for
the velocity field because it is on a discontinuous mesh.

--
You received this question notification because you are a member of
Fluidity Core Team, which is an answer contact for Fluidity.

Revision history for this message
liu chin chi (caite8001) said :
#7

   Hi, Mark Goffin

     I've tried excluding the InputMesh from adaptivity by turning on the option "exclude_from_mesh_adaptivity".
it would stop at the beginning. because there is another Mesh(BaseMesh) needs it.

     And another test using a discontinuous Galerkin.(vector_field::Velocity/prognostic/galerkin_projection
---> vector_field::Velocity/prognostic/galerkin_projection/discontinuous. )
     it would get the same Error Message.

     Appreciate your comments very much.

     Regards,

     ChinChi

Revision history for this message
Jon Hill (jon-hill) said :
#8

Hi ChinChi,

The issue here is that you are using an extruded mesh (extruded within Fluidity) with full (i.e. 3D) mesh adaptivity. You have two options:
 1) Use 2D+1 adaptivity which means switching on the vertically_structured_adaptivity option. This will adapt in the horizontal, then in the vertical, giving a semi-structured mesh.
 2) If you want a fully unstructured mesh, then you must start with a 3D mesh. You should then generate a 3D mesh in GMSH and use that as your input mesh such that you do not need to extrude in Fluidity.

Hope that makes sense.

Revision history for this message
liu chin chi (caite8001) said :
#9

 Hi Jon, you are right, thanks.