|
| 1 | +# A test that makes sure that the model crashes with the expected |
| 2 | +# error message if particles are combined with a free surface. |
| 3 | + |
| 4 | +# EXPECT FAILURE |
| 5 | + |
| 6 | +set Dimension = 2 |
| 7 | +set End time = 70 |
| 8 | +set Use years in output instead of seconds = false |
| 9 | +set Pressure normalization = no |
| 10 | + |
| 11 | +subsection Geometry model |
| 12 | + set Model name = box |
| 13 | + subsection Box |
| 14 | + set X extent = 0.9142 |
| 15 | + set Y extent = 1.0000 |
| 16 | + end |
| 17 | +end |
| 18 | + |
| 19 | +subsection Boundary velocity model |
| 20 | + set Tangential velocity boundary indicators = left, right |
| 21 | + set Zero velocity boundary indicators = bottom |
| 22 | +end |
| 23 | + |
| 24 | +subsection Free surface |
| 25 | + set Free surface boundary indicators = top |
| 26 | +end |
| 27 | + |
| 28 | +subsection Material model |
| 29 | + set Model name = simple |
| 30 | + subsection Simple model |
| 31 | + set Reference density = 1010 |
| 32 | + set Viscosity = 1e2 |
| 33 | + set Thermal expansion coefficient = 0 |
| 34 | + end |
| 35 | +end |
| 36 | + |
| 37 | +subsection Gravity model |
| 38 | + set Model name = vertical |
| 39 | + subsection Vertical |
| 40 | + set Magnitude = 10 |
| 41 | + end |
| 42 | +end |
| 43 | + |
| 44 | + |
| 45 | +############### Parameters describing the temperature field |
| 46 | +# Note: The temperature plays no role in this model |
| 47 | + |
| 48 | +subsection Boundary temperature model |
| 49 | + set List of model names = box |
| 50 | +end |
| 51 | + |
| 52 | +subsection Initial temperature model |
| 53 | + set Model name = function |
| 54 | + subsection Function |
| 55 | + set Function expression = 0 |
| 56 | + end |
| 57 | +end |
| 58 | + |
| 59 | + |
| 60 | +############### Parameters describing the compositional field |
| 61 | +# Note: The compositional field is what drives the flow |
| 62 | +# in this example |
| 63 | + |
| 64 | +subsection Compositional fields |
| 65 | + set Number of fields = 1 |
| 66 | +end |
| 67 | + |
| 68 | +subsection Initial composition model |
| 69 | + set Model name = function |
| 70 | + subsection Function |
| 71 | + set Variable names = x,z |
| 72 | + set Function constants = pi=3.1415926 |
| 73 | + set Function expression = 0.5*(1+tanh((0.2+0.02*cos(pi*x/0.9142)-z)/0.02)) |
| 74 | + end |
| 75 | +end |
| 76 | + |
| 77 | +subsection Material model |
| 78 | + subsection Simple model |
| 79 | + set Density differential for compositional field 1 = -10 |
| 80 | + end |
| 81 | +end |
| 82 | + |
| 83 | + |
| 84 | +############### Parameters describing the discretization |
| 85 | + |
| 86 | +subsection Mesh refinement |
| 87 | + set Initial adaptive refinement = 0 |
| 88 | + set Strategy = composition |
| 89 | + set Initial global refinement = 4 |
| 90 | + set Time steps between mesh refinement = 0 |
| 91 | + set Coarsening fraction = 0.05 |
| 92 | + set Refinement fraction = 0.3 |
| 93 | +end |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +############### Parameters describing what to do with the solution |
| 98 | + |
| 99 | +subsection Postprocess |
| 100 | + set List of postprocessors = velocity statistics, composition statistics,particles |
| 101 | + |
| 102 | + subsection Particles |
| 103 | + set Number of particles = 10 |
| 104 | + set Time between data output = 70 |
| 105 | + set Data output format = vtu |
| 106 | + set List of particle properties = velocity,function, initial composition, initial position |
| 107 | + |
| 108 | + subsection Function |
| 109 | + set Variable names = x,z |
| 110 | + set Function expression = if( (z>0.2+0.02*cos(pi*x/0.9142)) , 0 , 1 ) |
| 111 | + end |
| 112 | + |
| 113 | + set Particle generator name = uniform box |
| 114 | + |
| 115 | + subsection Generator |
| 116 | + subsection Uniform box |
| 117 | + set Minimum x = 0.3 |
| 118 | + set Maximum x = 0.5 |
| 119 | + set Minimum y = 0.1 |
| 120 | + set Maximum y = 0.3 |
| 121 | + end |
| 122 | + end |
| 123 | + end |
| 124 | +end |
0 commit comments