underworldcode / underworld2

underworld2: A parallel, particle-in-cell, finite element code for Geodynamics.
http://www.underworldcode.org/
Other
174 stars 59 forks source link

velocity boundary #29

Closed ghost closed 8 years ago

ghost commented 9 years ago

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.

Underworld /Users/InputFiles/BaseApps/ExtensionBaseApp.xml StgFEM_FrequentOutput context Underworld_Vrms context gaussSwarm VelocityField StgFEM_CPUTime context StgFEM_StandardConditionFunctions context ViscosityLimiter 10e24 1e0 ``` Scaling 1e6 316.223 8e19 1 Everywhere Box 0.0 4000 0.0 350 Box 0 0 0 0 Box 1200 3400 900 1000 PolygonShape 1200 1000 1200 900 1020 800 1020 900 Union mainSlab slabPerturbation MaterialViscosity 1e20 RheologyMaterial upperMantleShape 3300 upperMantleViscosity MaterialViscosity 1e22 RheologyMaterial lowerMantleShape 3300 lowerMantleViscosity MaterialViscosity 1e20 RheologyMaterial ContinentShape 3300 ContinentViscosity MaterialViscosity 1e22 Byerlee StrainRateField geometry linearMesh 32e6 0.25 RheologyMaterial slabShape 3380 slabViscosity slabYielding MaterialFeVariable picIntegrationPoints Slab context linearMesh MaterialFeVariable picIntegrationPoints LowerMantle context linearMesh ``` Box minX 0.1 minY maxY true t 2 t 2 f 2 2 f 1 1 ./output/Subduction_BC 9.8 0 2 128 64 1 0 4000 0 1000 True True 20 20 2 2 2 ``` ``` ``` velocityMesh velocityRemesher VelocityField VelocityField velocity /struct> ``` /Users/huilin/Downloads/InputFiles/velocityBCs_HL.xml ``` Underworld/Viewports/ParticleMaterialVP.xml Underworld/Viewports/VelocityMagnitudeVP.xml gLucifer/window.xml ParticleMaterialVP VelocityMagnitudeVP ```

<?xml version="1.0"?> <!DOCTYPE StGermainData SYSTEM "stgermain.dtd">

``` CompositeVC WallVC bottom vy double 0 WallVC left vx func StepFunctionProduct2 WallVC right vx func StepFunctionProduct1 WallVC front vz double 0 WallVC back vz double 0 WallVC top vy double 0 ``` 0.3 0.7 e-11 0.3 1 e-11
jmansour commented 9 years ago

Your model files haven't uploaded correctly. Perhaps tarball/zip them and upload them somewhere.

But are you trying to use a step boundary condition and a deforming mesh? I can't imagine this would end well, as the mesh would turn to rubbish very quickly.

ghost commented 9 years ago

Thanks for your responds! I am trying to construct a subduction model that lithosphere are converging and underlying mantle could flow out. I have no clue what kind of meshing method is suitable here. I would appreciate if you could help me with this. I convert model files to a PDF and upload here. SubductionTest.pdf

jmansour commented 9 years ago

Perhaps you can draw a diagram of exactly what you are hoping to achieve? Also, I'd suggest if you are just starting to use Underworld, you should switch to using Underworld2, as the original Underworld is no longer being developed.

ghost commented 9 years ago

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.

Another 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?

Another 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!

subduction

jmansour commented 9 years ago

Yes, you would have to be careful that you do not violate mass conservation, or else you will encounter big difficulties with the solver.

You might even try only enforcing the BCs for the lithosphere, having no-slip on the bottom, and then having 'open' for the mantle (ie, don't prescribe anything). This way you won't have any conservation issues.

Alternatively, you might set the boundary conditions as close to mass equilibrium as possible (equal inflow to outflow), but also include a small compressible layer which might take up any slack.

We do not currently have stress BC, but they will be available in the near future (in Underworld2).

I can't really give recommendations on any XML files in honesty. Many of these are broken and outdated. Underworld2 is the solution. Also, you can easily implement phase change in Underworld2. Did I mention Underworld2?

You can find some tutorials here: https://github.com/underworldcode/underworld2/tree/development/docs/tutorials

OlympusMonds commented 9 years ago

Hi John, how would one leave the mantle open in UW2? Doesn't everything fall out the bottom due to gravity?

ghost commented 8 years ago

Thanks for your reply and information about underworld2. I was trying to install underworld2, but I met an error when configure it. It says "Failed to locate required package HDF5." But I already has install hdf5-1.8.16 on my mac. Do you have any idea where goes wrong?

scons: Reading SConscript files ... Checking whether the C compiler worksyes Checking for Solvers... yes Checking for package libm... yes Checking for package libXML2... yes Checking for package MPI... yes Checking for package HDF5... no

\ ERROR ** Failed to locate required package HDF5. Details in 'config.log'

jmansour commented 8 years ago

Luke, I believe it should be sufficiently constrained to prevent everything falling out the bottom... whether it's sufficiently physical is another question.

huilin, perhaps you'd like to give dockers a shot:

http://www.underworldcode.org/posts/Underworld-and-Dockers/

lmoresi commented 8 years ago

Maybe - but beware the null space

Sent from my iPhone

On 19 Nov 2015, at 14:26, jmansour notifications@github.com<mailto:notifications@github.com> wrote:

Luke, I believe it should be sufficiently constrained to prevent everything falling out the bottom... whether it's sufficiently physical is another question.

huilin, perhaps you'd like to give dockers a shot:

http://www.underworldcode.org/posts/Underworld-and-Dockers/

— Reply to this email directly or view it on GitHubhttps://github.com/underworldcode/underworld2/issues/29#issuecomment-158220090.

ghost commented 8 years ago

Thanks! I'll try Underworld2.