{"action":"created","issue":{"url":"https://api.github.com/repos/underworldcode/underworld2/issues/29","labels_url":"https://api.github.com/repos/underworldcode/underworld2/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/underworldcode/underworld2/issues/29/comments","events_url":"https://api.github.com/repos/underworldcode/underworld2/issues/29/events","html_url":"https://github.com/underworldcode/underworld2/issues/29","id":116192412,"number":29,"title":"velocity boundary","user":{"login":"huilin0302","id":15789625,"avatar_url":"https://avatars.githubusercontent.com/u/15789625?v=3","gravatar_id":"","url":"https://api.github.com/users/huilin0302","html_url":"https://github.com/huilin0302","followers_url":"https://api.github.com/users/huilin0302/followers","following_url":"https://api.github.com/users/huilin0302/following{/other_user}","gists_url":"https://api.github.com/users/huilin0302/gists{/gist_id}","starred_url":"https://api.github.com/users/huilin0302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huilin0302/subscriptions","organizations_url":"https://api.github.com/users/huilin0302/orgs","repos_url":"https://api.github.com/users/huilin0302/repos","events_url":"https://api.github.com/users/huilin0302/events{/privacy}","received_events_url":"https://api.github.com/users/huilin0302/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-10T20:15:17Z","updated_at":"2015-11-17T18:58:01Z","closed_at":null,"body":"Hi,   I am new to Underworld.  Right now,  I am trying to set different velocities at side boundaries using Stepfunction.    I already tried using uniform velocity at side boundaries and the results turns out all right.   But when I use step function (convergent in the upper part and Vx=0 in the lower part of model), there are no velocity  shown in result.  Does anyone know where is wrong?  I attached my input file here.  \r\n\r\n\r\n<!-- DTD to validate against -->\r\n<StGermainData xmlns=\"http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003\">\r\n\r\n  <list name=\"import\">\r\n     <param>Underworld</param>\r\n  </list>\r\n\r\n  <include>/Users/InputFiles/BaseApps/ExtensionBaseApp.xml</include>\r\n\r\n  <list name=\"plugins\" mergeType=\"merge\">\r\n     <struct>\r\n        <param name=\"Type\">StgFEM_FrequentOutput</param>\r\n        <param name=\"Context\">context</param>\r\n     </struct>\r\n     <struct>\r\n        <param name=\"Type\">Underworld_Vrms</param>\r\n        <param name=\"Context\">context</param>\r\n        <param name=\"GaussSwarm\">gaussSwarm</param>\r\n        <param name=\"VelocityField\">VelocityField</param>\r\n     </struct>\r\n     <struct>\r\n        <param name=\"Type\">StgFEM_CPUTime</param>\r\n        <param name=\"Context\">context</param>\r\n     </struct>\r\n      <struct>\r\n         <param name=\"Type\">StgFEM_StandardConditionFunctions</param>\r\n         <param name=\"Context\">context</param>\r\n      </struct>\r\n  </list>\r\n\r\n\r\n  <struct name=\"components\" mergeType=\"merge\">\r\n\r\n   <!-- define a general limiter for viscosity used to constrain\r\n        wacky values that may come from our Non Newtonian rheology\r\n   -->\r\n   <struct name=\"viscosityLimiter\">\r\n     <param name=\"Type\">ViscosityLimiter</param>\r\n     <param name=\"maxViscosity\" units=\"Pa*s\">10e24</param>\r\n     <param name=\"minViscosity\" units=\"Pa*s\">1e0</param>\r\n   </struct>\r\n\r\n\r\n     <!-- SCALING component definition -->\r\n     <!-- scaling -->\r\n     <struct name=\"default_scaling\">\r\n        <param name=\"Type\">Scaling</param>\r\n        <param name=\"spaceCoefficient_meters\"> 1e6 </param>\r\n        <param name=\"timeCoefficient_seconds\"> 316.223 </param>\r\n        <param name=\"massCoefficient_kilograms\"> 8e19 </param>\r\n        <param name=\"temperatureCoefficient_kelvin\"> 1 </param>\r\n     </struct>\r\n\r\n     <!-- Shape Stuff -->\r\n     <struct name=\"upperMantleShape\">\r\n        <param name=\"Type\">Everywhere</param>\r\n     </struct>\r\n     <struct name=\"lowerMantleShape\">\r\n        <param name=\"Type\">Box</param>\r\n        <param name=\"startX\" units=\"km\">0.0</param>\r\n        <param name=\"endX\" units=\"km\">4000</param>\r\n        <param name=\"startY\" units=\"km\">0.0</param>\r\n        <param name=\"endY\" units=\"km\">350</param>\r\n     </struct>\r\n     <struct name=\"ContinentShape\">\r\n        <param name=\"Type\">Box</param>\r\n        <param name=\"startX\" units=\"km\">0</param>\r\n        <param name=\"endX\" units=\"km\">0</param>\r\n        <param name=\"startY\" units=\"km\">0</param>\r\n        <param name=\"endY\" units=\"km\">0</param>\r\n     </struct>\r\n\t<struct name=\"mainSlab\">\r\n        <param name=\"Type\">Box</param>\r\n        <param name=\"startX\" units=\"km\">1200</param>\r\n        <param name=\"endX\" units=\"km\">3400</param>\r\n        <param name=\"startY\" units=\"km\">900</param>\r\n        <param name=\"endY\" units=\"km\">1000</param>\r\n     </struct>\r\n     <struct name=\"slabPerturbation\">\r\n        <param name=\"Type\">PolygonShape</param>\r\n        <list name=\"vertices\">\r\n           <asciidata>\r\n              <columnDefinition name = \"x\" type=\"double\" units=\"km\"/>\r\n              <columnDefinition name = \"y\" type=\"double\" units=\"km\"/>\r\n              1200   1000 \r\n              1200   900 \r\n              1020   800 \r\n              1020   900 \r\n           </asciidata>\r\n        </list>\r\n     </struct>\r\n     <struct name=\"slabShape\">\r\n        <param name=\"Type\">Union</param>\r\n        <list name=\"shapes\">\r\n           <param>mainSlab</param>\r\n           <param>slabPerturbation</param>\r\n        </list>\r\n     </struct>\r\n\r\n\r\n     <!-- Background Material Stuff -->\r\n     <struct name=\"upperMantleViscosity\">\r\n        <param name=\"Type\">MaterialViscosity</param>\r\n        <param name=\"eta0\" units=\"Pa*s\">1e20</param>\r\n     </struct>\r\n     <struct name=\"upperMantle\">\r\n        <param name=\"Type\">RheologyMaterial</param>\r\n        <param name=\"Shape\">upperMantleShape</param>\r\n        <param name=\"density\" units=\"kg*m^-3\">3300</param>\r\n        <param name=\"Rheology\">upperMantleViscosity</param>\r\n     </struct>\r\n\r\n     <!-- Lower Mantle Material Stuff -->\r\n     <struct name=\"lowerMantleViscosity\">\r\n        <param name=\"Type\">MaterialViscosity</param>\r\n        <!-- Viscosity 100 x Upper Mantle -->\r\n        <param name=\"eta0\" units=\"Pa*s\">1e22</param>\r\n     </struct>\r\n     <struct name=\"LowerMantle\">\r\n        <param name=\"Type\">RheologyMaterial</param>\r\n        <param name=\"Shape\">lowerMantleShape</param>\r\n        <param name=\"density\" units=\"kg*m^-3\">3300</param>\r\n        <param name=\"Rheology\">lowerMantleViscosity</param>\r\n     </struct>\r\n\r\n     <!-- Continent Material Stuff -->\r\n     <struct name=\"ContinentViscosity\">\r\n        <param name=\"Type\">MaterialViscosity</param>\r\n        <!-- Viscosity 200 x Upper Mantle -->\r\n        <param name=\"eta0\" units=\"Pa*s\">1e20</param>\r\n     </struct>\r\n     <struct name=\"Continent\">\r\n        <param name=\"Type\">RheologyMaterial</param>\r\n        <param name=\"Shape\">ContinentShape</param>\r\n        <param name=\"density\" units=\"kg*m^-3\">3300</param>\r\n        <param name=\"Rheology\">ContinentViscosity</param>\r\n     </struct>\r\n\r\n\r\n     <!-- Slab Stuff -->\r\n     <struct name=\"slabViscosity\">\r\n        <param name=\"Type\">MaterialViscosity</param>\r\n        <!-- Viscosity 200 x Upper Mantle (Background)-->\r\n        <param name=\"eta0\" units=\"Pa*s\">1e22</param>\r\n     </struct>\r\n     <struct name=\"slabYielding\">\r\n        <param name=\"Type\">Byerlee</param>\r\n        <param name=\"StrainRateField\">StrainRateField</param>\r\n        <param name=\"BlockGeometry\">geometry</param>\r\n        <param name=\"FeMesh\">linearMesh</param>\r\n        <param name=\"cohesion\" units=\"Pa\">32e6</param>\r\n        <param name=\"depthCoefficient\">0.25</param>\r\n     </struct>\r\n     <struct name=\"Slab\">\r\n        <param name=\"Type\">RheologyMaterial</param>\r\n        <param name=\"Shape\">slabShape</param>\r\n        <param name=\"density\" units=\"kg*m^-3\">3380</param>\r\n        <list name=\"Rheology\">\r\n           <param>slabViscosity</param>\r\n           <param>slabYielding</param>\r\n        </list>\r\n     </struct>\r\n     <!-- Slab Field Stuff -->\r\n     <struct name=\"SlabField\">\r\n        <param name=\"Type\">MaterialFeVariable</param>\r\n        <param name=\"Swarm\">picIntegrationPoints</param>\r\n        <param name=\"Material\">Slab</param>\r\n        <param name=\"Context\">context</param>\r\n        <param name=\"Mesh\">linearMesh</param>\r\n     </struct>\r\n\r\n     <!-- Lower Mantle Field Stuff -->\r\n     <struct name=\"LowerMantleField\">\r\n        <param name=\"Type\">MaterialFeVariable</param>\r\n        <param name=\"Swarm\">picIntegrationPoints</param>\r\n        <param name=\"Material\">LowerMantle</param>\r\n        <param name=\"Context\">context</param>\r\n        <param name=\"Mesh\">linearMesh</param>\r\n     </struct>\r\n  </struct>\r\n\r\n   <struct name=\"leftBoundaryShape\">\r\n     <param name=\"Type\">Box</param>\r\n     <param name=\"startX\">minX</param>\r\n     <param name=\"endX\">0.1</param>\r\n     <param name=\"startY\">minY</param>\r\n     <param name=\"endY\">maxY</param>\r\n   </struct>\r\n\r\n\r\n  <param name=\"journal.info.Context-verbose\">true</param>\r\n  <param name=\"journal.debug\">t</param>\r\n  <param name=\"journal-level.info.Stg_ComponentFactory\">2</param>\r\n  <param name=\"journal-enable-branch.debug.StgFEM\">t</param>\r\n  <param name=\"journal-level-branch.debug.StgFEM\">2</param>\r\n  <param name=\"journal-enable-branch.debug.Swarm\">f</param>\r\n  <param name=\"journal-level-branch.debug.Swarm\">2</param>\r\n  <param name=\"journal-level.debug.lucDebug\">2</param>\r\n  <param name=\"journal-enable-branch.debug.lucDebug\">f</param>\r\n\r\n  <!-- general simulation parameters -->\r\n  <param name=\"maxTimeSteps\">1</param>\r\n  <param name=\"dumpEvery\">1</param>\r\n  <param name=\"outputPath\">./output/Subduction_BC</param>\r\n  <param name=\"gravity\" units=\"m*s^-2\">9.8</param>   \r\n  <param name=\"checkpointEvery\">0</param>\r\n\r\n  <!--   choose what to checkpoint\r\n  <list name=\"FieldVariablesToCheckpoint\">\r\n     <param>VelocityField</param>\r\n     <param>VelocityGradientsField</param>\r\n  </list>\r\n  -->\r\n\r\n  <!--  restart from a previous checkpoint \r\n  <param name=\"restartTimestep\">10</param>\r\n  -->\r\n\r\n  <!-- general decomposition parameters -->\r\n  <param name=\"dim\">2</param>\r\n  <!-- mesh parameters -->\r\n  <param name=\"elementResI\">128</param>\r\n  <param name=\"elementResJ\">64</param>\r\n\r\n  <param name=\"shadowDepth\">1</param>\r\n  <param name=\"minX\" units=\"km\"> 0 </param>\r\n  <param name=\"maxX\" units=\"km\"> 4000 </param>\r\n  <param name=\"minY\" units=\"km\"> 0 </param>\r\n  <param name=\"maxY\" units=\"km\"> 1000 </param>\r\n  <param name=\"allowUnbalancing\">True</param>\r\n  <param name=\"buildElementNodeTbl\">True</param>\r\n\r\n  <!-- Non-linear stuff -->\r\n  <param name=\"nonLinearMaxIterations\">20</param>\r\n\r\n  <!-- Swarm parameters -->\r\n  <param name=\"particlesPerCell\">20</param>\r\n <param name=\"gaussParticlesX\">2</param>\r\n <param name=\"gaussParticlesY\">2</param>\r\n <param name=\"gaussParticlesZ\">2</param>\r\n\r\n\r\n       <struct name=\"EulerDeform\">\r\n\t\t<list name=\"systems\">\r\n<!--\r\n                       <struct>\r\n                               <param name=\"mesh\"> constantMesh </param>\r\n                               <param name=\"velocityField\"> VelocityField </param>\r\n                       </struct>\r\n-->\r\n                       <struct>\r\n                               <param name=\"mesh\"> velocityMesh </param>\r\n                               <param name=\"remesher\">velocityRemesher</param>\r\n                               <param name=\"velocityField\"> VelocityField </param>\r\n                               <list name=\"fields\">\r\n                                       <struct>\r\n                                               <param name=\"field\">VelocityField</param>\r\n                                               <param name=\"variable\">velocity</param>\r\n                                       </struct>\r\n                               </list>\r\n                       </struct>\r\n               </list>\r\n       </struct>/struct>\r\n\r\n  <!-- Boundary conditions -->\r\n  <include>/Users/huilin/Downloads/InputFiles/velocityBCs_HL.xml</include>\r\n\r\n       <!-- Visualisation stuff -->\r\n       <include>Underworld/Viewports/ParticleMaterialVP.xml</include>\r\n       <include>Underworld/Viewports/VelocityMagnitudeVP.xml</include>\r\n       <include>gLucifer/window.xml</include>\r\n       <struct name=\"components\" mergeType=\"merge\">\r\n        \t<struct name=\"window\" mergeType=\"merge\">\r\n          \t\t<param name=\"Viewport\">ParticleMaterialVP VelocityMagnitudeVP</param>\r\n        \t</struct>\r\n       </struct>\r\n\r\n</StGermainData>\r\n\r\n\r\n\r\n\r\n\r\n<?xml version=\"1.0\"?>\r\n<!DOCTYPE StGermainData SYSTEM \"stgermain.dtd\">\r\n<!-- A StGermain input file -->\r\n<!-- DTD to validate against -->\r\n<StGermainData xmlns=\"http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003\">\r\n\r\n\t<!-- Velocity BCs -->\r\n\t<struct name=\"velocityBCs\">\r\n\t\t<param name=\"type\">CompositeVC</param>\r\n\t\t<list name=\"vcList\">\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> bottom </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vy</param>\r\n\t\t\t\t\t\t<param name=\"type\">double</param>\r\n\t\t           \t\t\t<param name=\"value\"> 0 </param>\r\n                                       </struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> left </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vx</param>\r\n\t\t\t\t\t\t<param name=\"type\">func</param>\r\n                                               <param name=\"value\">StepFunctionProduct2</param>\r\n\t\t\t\t\t</struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> right </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vx</param>\r\n\t\t\t\t\t\t<param name=\"type\">func</param>\r\n                                               <param name=\"value\">StepFunctionProduct1</param>\r\n\t\t\t\t\t</struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> front </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vz</param>\r\n\t\t\t\t\t\t<param name=\"type\">double</param>\r\n                                               <param name=\"value\"> 0 </param>\r\n\t\t\t\t\t</struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> back </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vz</param>\r\n\t\t\t\t\t\t<param name=\"type\">double</param>\r\n                                               <param name=\"value\"> 0 </param>\r\n\t\t\t\t\t</struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t\t<struct>\r\n\t\t\t\t<param name=\"type\"> WallVC </param>\r\n\t\t\t\t<param name=\"wall\"> top </param>\r\n\t\t\t\t<list name=\"variables\">\r\n\t\t\t\t\t<struct>\r\n\t\t\t\t\t\t<param name=\"name\">vy</param>\r\n\t\t\t\t\t\t<param name=\"type\">double</param>\r\n                                               <param name=\"value\"> 0 </param>\r\n\t\t\t\t\t</struct>\r\n\t\t\t\t</list>\r\n\t\t\t</struct>\r\n\t\t</list>\r\n\t</struct>\r\n<param name=\"StepFunctionProduct1Start\">0.3</param>\r\n<param name=\"StepFunctionProduct1End\">0.7</param>\r\n<param name=\"StepFunctionProduct1Value\">e-11</param>\r\n<param name=\"StepFunctionProduct2Start\">0.3</param>\r\n<param name=\"StepFunctionProduct2End\">1</param>\r\n<param name=\"StepFunctionProduct2Value\">e-11</param>\r\n</StGermainData>"},"comment":{"url":"https://api.github.com/repos/underworldcode/underworld2/issues/comments/157470475","html_url":"https://github.com/underworldcode/underworld2/issues/29#issuecomment-157470475","issue_url":"https://api.github.com/repos/underworldcode/underworld2/issues/29","id":157470475,"user":{"login":"huilin0302","id":15789625,"avatar_url":"https://avatars.githubusercontent.com/u/15789625?v=3","gravatar_id":"","url":"https://api.github.com/users/huilin0302","html_url":"https://github.com/huilin0302","followers_url":"https://api.github.com/users/huilin0302/followers","following_url":"https://api.github.com/users/huilin0302/following{/other_user}","gists_url":"https://api.github.com/users/huilin0302/gists{/gist_id}","starred_url":"https://api.github.com/users/huilin0302/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huilin0302/subscriptions","organizations_url":"https://api.github.com/users/huilin0302/orgs","repos_url":"https://api.github.com/users/huilin0302/repos","events_url":"https://api.github.com/users/huilin0302/events{/privacy}","received_events_url":"https://api.github.com/users/huilin0302/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T18:58:01Z","updated_at":"2015-11-17T18:58:01Z","body":"Hi,  I draw two diagrams.  The upper one has both inflow and outflow at side boundaries.  I hope to keep side boundaries fixed.  I tried to modify viscous_inflow.xml in Gale cookbook to achieve this.  But the model does't to converge.  \r\n\r\nAnother way I think could work for me is compressing the side boundaries and allow materials flow out from lower boundary.  In order to keep mass balance in the model domain, the lower boundary may need StressBC.  I looked at input examples of Underworld. Will ExtensionIncompressibleQ1Q1CompensatedFreeBaseApp.xml suitable for this situation?  \r\n\r\nAnother question:  does Underworld has phase change? Like when one material particles gets to a certain pressure and/or temperature field, they can change to another material with different viscosity and/or density?  Thanks!\r\n\r\n![subduction](https://cloud.githubusercontent.com/assets/15789625/11221004/9c3a082c-8d17-11e5-80fe-2d129b14e100.jpg)"}}