<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tuflow.com/w/index.php?action=history&amp;feed=atom&amp;title=Tute_M04_MI_2d_code_Archive</id>
	<title>Tute M04 MI 2d code Archive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tuflow.com/w/index.php?action=history&amp;feed=atom&amp;title=Tute_M04_MI_2d_code_Archive"/>
	<link rel="alternate" type="text/html" href="https://wiki.tuflow.com/w/index.php?title=Tute_M04_MI_2d_code_Archive&amp;action=history"/>
	<updated>2026-05-17T17:34:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.tuflow.com/w/index.php?title=Tute_M04_MI_2d_code_Archive&amp;diff=31375&amp;oldid=prev</id>
		<title>ElizaCollison: Created page with &quot;=Introduction= As with the breaklines, this can be done in two different layers.  The 2d_code format can be used, this type of layer was used in module 1 to define the active...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tuflow.com/w/index.php?title=Tute_M04_MI_2d_code_Archive&amp;diff=31375&amp;oldid=prev"/>
		<updated>2023-01-08T23:09:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Introduction= As with the breaklines, this can be done in two different layers.  The 2d_code format can be used, this type of layer was used in module 1 to define the active...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Introduction=&lt;br /&gt;
As with the breaklines, this can be done in two different layers.  The 2d_code format can be used, this type of layer was used in module 1 to define the active area.  The polygon has only one attribute that is an integer value 0 for inactive and 1 for active.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we have the &amp;quot;HX&amp;quot; lines in the 2d_bc we can also create the polygon in this layer.  This is the method which is outlined below. As we have changed the downstream boundary configuration, we also need to revise our active code layer.&lt;br /&gt;
=Method=&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
Firstly we will update the active 2D model area near the downstream boundary.&lt;br /&gt;
&amp;lt;li&amp;gt;Save a copy of &amp;#039;&amp;#039;&amp;#039;2d_code_M01_002&amp;#039;&amp;#039;&amp;#039; as &amp;#039;&amp;#039;&amp;#039;2d_code_M04_001&amp;#039;&amp;#039;&amp;#039;.  Open this layer and make it selectable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Zoom into the downstream area of the model.  There is a gap between the HX boundaries (1D/2D boundaries) and the active code area.  If we leave the model with this configuration, water will not be able to leave enter the 1D model from the floodplain. The area is shown in the image below.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Tute M04 MI 2d code 01.jpg|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure that the &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001&amp;#039;&amp;#039;&amp;#039; layer is open.  Make sure this layer is selectable (but not editable).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Make sure that snapping is turned on.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select the polygon in the &amp;#039;&amp;#039;&amp;#039;2d_code_M04_001&amp;#039;&amp;#039;&amp;#039; layer and select the reshape tool from the toolbars ([[File:MI reshape.jpg]]).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Move the four vertices on the code polygon so that they snap to the vertices on the &amp;quot;HX&amp;quot; lines as shown in the image below.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Tute M04 MI 2d code 02.jpg|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save the &amp;#039;&amp;#039;&amp;#039;2d_code_M04_001&amp;#039;&amp;#039;&amp;#039; layer and export this into .MIF format.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we will create a polygon to deactivate the 2D cells in the creek area.  Make sure the &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001&amp;#039;&amp;#039;&amp;#039; is editable.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a new polygon. Essentially we want to snap the line to each vertex on HX line to enclose these into a polygon.  Fortunately we don&amp;#039;t need to do this manually!  Snap the first vertex to the end of one the &amp;quot;HX&amp;quot; line.  To trace the HX line hold the &amp;quot;shift&amp;quot; key and then move the cursor to the other end of the HX line.  The polygon should be tracing the line as shown below.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Tute M04 MI 2d code 03.jpg|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create three polygons that enclose the areas modelled in 1D.  Note that at the road embankment, as we have not included a 1D weir, we will be modelling any overtopping in 2D and the polygon should not cover the road area.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Tute M04 MI 2d code 04.jpg|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For each of the polygons, set the &amp;quot;Type&amp;quot; to &amp;quot;CD&amp;quot; and the &amp;quot;f&amp;quot; attribute to 0.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Tute M04 MI 2d code 05.jpg|300px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save the &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001&amp;#039;&amp;#039;&amp;#039; layer and export this into .MIF format.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
=Conclusion=&lt;br /&gt;
We have modified the active model area &amp;#039;&amp;#039;&amp;#039;2d_code_M04_001&amp;#039;&amp;#039;&amp;#039; and also modified the boundary file to null the cells within the 1D model area.  Both layers are now ready for input to our TUFLOW model.  Return to the tutorial where the next step is to &amp;lt;u&amp;gt;[[Tutorial_Module04_Archive#Define_Boundary_Conditions | define the revised boundary conditions.]]&amp;lt;/u&amp;gt;&lt;/div&gt;</summary>
		<author><name>ElizaCollison</name></author>
	</entry>
</feed>