<?xml version="1.0" encoding="UTF-8" ?>
<case>
    <casedef>
        <constantsdef>
            <lattice bound="1" fluid="1" />			
            <gravity x="0" y="0" z="-9.81" comment="Gravitational acceleration" units_comment="m/s^2" />
            <rhop0 value="1000" comment="Reference density of the fluid" units_comment="kg/m^3" />
            <hswl value="0.4" auto="false" comment="Maximum still water level to calculate speedofsound using coefsound" units_comment="metres (m)" />
            <gamma value="7" comment="Polytropic constant for water used in the state equation" />
            <speedsystem value="0" auto="true" comment="Maximum system speed (by default the dam-break propagation is used)" />
            <coefsound value="30" comment="Coefficient to multiply speedsystem" />
            <speedsound value="0" auto="true" comment="Speed of sound to use in the simulation (by default speedofsound=coefsound*speedsystem)" />
            <coefh value="1" comment="Coefficient to calculate the smoothing length (h=coefh*sqrt(3*dp^2) in 3D)" />			
            <cflnumber value="0.2" comment="Coefficient to multiply dt" />	
        </constantsdef>	
        <mkconfig boundcount="240" fluidcount="10">
            <mkorientfluid mk="0" orient="Xyz" />
        </mkconfig>
        <geometry>
            <definition dp="0.01001">
                <pointmin x="-1" y="-1" z="-1" />
                <pointmax x="3"  y="1" z="8" />
            </definition>
            <commands>
			 <list name="block">
                    <setdrawmode mode="full" />
                    <drawfilestl file="block.stl"/>
                    <fillpoint x="0" y="0" z="0">
                        <modefill>border | bound</modefill>
                    </fillpoint>
                    <move x="0" y="0.0744" z="0" />
                    <setmknextbound next="true" />
             </list>

			<list name="Row">
                    <matrixsave />
                    <runlist name="block" />
                    <runlist name="block" />
                    <runlist name="block" />
                    <runlist name="block" />
					<runlist name="block" />
					<runlist name="block" />
                    <matrixload />
					<move x="0.048" y="0" z="0" />
            </list>
			
                <mainlist>
                    <setshapemode>actual | dp | bound</setshapemode>
                    <setdrawmode mode="full" />
					<setmkbound mk="0" />
					<drawprism mask="7 | 8">
						<point x="1.9486" y="0" z="0.8" />
						<point x="1.9486" y="0" z="0.5628" />
						<point x="1.864" y="0" z="0.5628" />
						<point x="1" y="0" z="0" />
						<point x="0" y="0" z="0" />
						<point x="0" y="0" z="0.8" />
						<point x="1.9486" y="0.4464" z="0.8" />
						<point x="1.9486" y="0.4464" z="0.5628" />
						<point x="1.864" y="0.4464" z="0.5628" />
						<point x="1" y="0.4464" z="0" />
						<point x="0" y="0.4464" z="0" />
						<point x="0" y="0.4464" z="0.8" />
                    </drawprism>
					<shapeout file="tank" reset="true" />
					<setmkbound mk="0" />
                    <drawprism mask="3 | 7 | 8">
                        <point x="1.864" y="0" z="0.5628" />
                        <point x="1.9486" y="0" z="0.5628" />
                        <point x="1.9486" y="0" z="-0.10" />
                        <point x="0" y="0" z="-0.10" />
						<point x="0" y="0" z="0" />
                        <point x="1" y="0" z="0" />
						
                        
                        <point x="1.864" y="0.4464" z="0.5628" />
                        <point x="1.9486" y="0.4464" z="0.5628" />
                        <point x="1.9486" y="0.4464" z="-0.10" />
                        <point x="0" y="0.4464" z="-0.10" />
						<point x="0" y="0.4464" z="0" />
                        <point x="1" y="0.4464" z="0" />
                    </drawprism>
					<fillprism x="0.1" y="0.1" z="-0.05">
                        <point x="1.864" y="0" z="0.5628" />
                        <point x="1.9486" y="0" z="0.5628" />
                        <point x="1.9486" y="0" z="-0.10" />
                        <point x="0" y="0" z="-0.10" />
						<point x="0" y="0" z="0" />
                        <point x="1" y="0" z="0" />
						
                        <point x="1.864" y="0.4464" z="0.5628" />
                        <point x="1.9486" y="0.4464" z="0.5628" />
                        <point x="1.9486" y="0.4464" z="-0.10" />
                        <point x="0" y="0.4464" z="-0.10" />
						<point x="0" y="0.4464" z="0" />
                        <point x="1" y="0.4464" z="0" />
                        <modefill>void</modefill>
                    </fillprism>
					
                    <setmkbound mk="10" />
                    <drawbox>
                        <boxfill>solid</boxfill>
                        <point x="0.10" y="0" z="0" />
                        <size x="0.01" y="0.4464" z="0.8" />
                    </drawbox>
					<shapeout file="piston" reset="true" />
					
					
					<matrixreset />
					<move x="0.98428" y="0.0372" z="0.5" />
					<setdrawmode mode="solid" />
                    <setmkbound mk="20" />
					<runlist name="Row" />
					<shapeout file="blocks" reset="true" />
                </mainlist>
            </commands>
        </geometry>
		<motion>
			<objreal ref="10">
				<begin mov="1" start="0" />
				<mvnull id="1" />
			</objreal>
		</motion>
        
		<floatings>
            <floating mkbound="20" rhopbody="5400" property="lime-stone"/> 
			<floating mkbound="21" rhopbody="5400" property="lime-stone"/> 
			<floating mkbound="22" rhopbody="5400" property="lime-stone"/> 
			<floating mkbound="23" rhopbody="5400" property="lime-stone"/> 
			<floating mkbound="24" rhopbody="5400" property="lime-stone"/> 
			<floating mkbound="25" rhopbody="5400" property="lime-stone"/> 
        </floatings>
		<properties>      
            <propertyfile file="Floating_Materials.xml" path="materials" />
			<property name="userdef01" Restitution_Coefficient_User="0.55" comment="User redefinition for Restitution Coefficient (-)" />
            <links>
                <link mkbound="0" property="steel + userdef01" comment="Property for the tank" />
                <link mkbound="10" property="steel" comment="Property for the tank" />
            </links>
        </properties>
    </casedef>
    <execution>
        <parameters>
            <parameter key="PosDouble" value="1" comment="Precision in particle interaction 0:Simple, 1:Double, 2:Uses and saves double (default=0)" />		
            <parameter key="StepAlgorithm" value="1" comment="Step Algorithm 1:Verlet, 2:Symplectic (default=1)" />
            <parameter key="VerletSteps" value="40" comment="Verlet only: Number of steps to apply Euler timestepping (default=40)" />
            <parameter key="Kernel" value="1" comment="Interaction Kernel 1:Cubic Spline, 2:Wendland (default=2)" />
            <parameter key="ViscoTreatment" value="1" comment="Viscosity formulation 1:Artificial, 2:Laminar+SPS (default=1)" />
            <parameter key="Visco" value="0.01" comment="Viscosity value" /> % Note alpha can depend on the resolution. A value of 0.01 is recommended for near irrotational flows.
            <parameter key="ViscoBoundFactor" value="1" comment="Multiply viscosity value with boundary (default=1)" />
			<parameter key="DensityDT" value="1" comment="Density Diffusion Term 0:None, 1:Molteni, 2:Fourtakas, 3:Fourtakas(full) (default=0)" />
			<parameter key="DensityDTvalue" value="0.1" comment="DDT value (default=0.1)" />
            <parameter key="#Shifting" value="2" comment="Shifting mode 0:None, 1:Ignore bound, 2:Ignore fixed, 3:Full (default=0)" />
            <parameter key="#ShiftCoef" value="-2" comment="Coefficient for shifting computation (default=-2)" />
            <parameter key="#ShiftTFS" value="2.75" comment="Threshold to detect free surface. Typically 1.5 for 2D and 2.75 for 3D (default=0)" />
            <parameter key="RigidAlgorithm" value="2" comment="Rigid Algorithm 1:SPH, 2:DEM (default=1)" />
            <parameter key="FtPause" value="0.0" comment="Time to freeze the floatings at simulation start (warmup) (default=0)" units_comment="seconds" />
            <parameter key="CoefDtMin" value="0.05" comment="Coefficient to calculate minimum time step dtmin=coefdtmin*h/speedsound (default=0.05)" />
            <parameter key="#DtIni" value="0.0001" comment="Initial time step (default=h/speedsound)" units_comment="seconds" />
            <parameter key="#DtMin" value="0.00001" comment="Minimum time step (default=coefdtmin*h/speedsound)" units_comment="seconds" />
            <parameter key="#DtFixed" value="DtFixed.dat" comment="Dt values are loaded from file (default=disabled)" />
            <parameter key="DtAllParticles" value="0" comment="Velocity of particles used to calculate DT. 1:All, 0:Only fluid/floating (default=0)" />
            <parameter key="TimeMax" value="6" comment="Time of simulation" units_comment="seconds" />
            <parameter key="TimeOut" value="0.05" comment="Time out data" units_comment="seconds" />
            <parameter key="PartsOutMax" value="1" comment="%/100 of fluid particles allowed to be excluded from domain (default=1)" units_comment="decimal" />
            <parameter key="RhopOutMin" value="700" comment="Minimum rhop valid (default=700)" units_comment="kg/m^3" />
            <parameter key="RhopOutMax" value="1300" comment="Maximum rhop valid (default=1300)" units_comment="kg/m^3" />
            <simulationdomain comment="Defines domain of simulation (default=Uses minimun and maximum position of the generated particles)">
				<posmin x="default" y="default-1" z="default-1" comment="e.g.: x=0.5, y=default-1, z=default-10%" />
                <posmax x="default+20%" y="default+20%" z="default+20%" />
            </simulationdomain>
        </parameters>	
    </execution>
</case>
