[CIG-MC] creating a viscosity structure in CitcomS

Scott Tarlow scott_tarlow at yahoo.com
Fri Sep 19 12:55:03 PDT 2014


HI William,

I’ve accomplished this two ways, one only involves minor coding (but not recommended) and the other involves a bit of coding, but is faster and is more versatile. 

The first way of implementing a static viscosity structure (weak or strong) in a region mesh (I’m assuming) is to use the already developed tracer code. This will allow you to place tracers where ever you want in the mesh by inputting a coordinate file for the tracers. After this is done, you can choose to the options to turn on the “low viscosity wedge” or “low viscosity channel”. Both will work depending on your needs. If you need the viscosity structure to be fixed, you can modify the tracer_setup.c (I think) file to make it so the tracers do not advect. This method works OK for viscosity changes less than a power of 2 or 3; if you go any higher you will notice quickly that your solver is not converging. 

The second and better way is to indeed modify viscosity_structures.c. The way to implement it is to add a new function at the end of the file that pulls all the nodes in which viscosity you want to change, multiply the current viscosity by some prefactor and then replace the old value with the new one. You can accomplish this by imputing a file of all the nodes you want to change (recommended ) or hard coding it it not the system (less verstile). This will allow you have some sort of viscous gradient in your mesh and allow you to build up to much larger viscosity changes (haven’t tested powers greater than 5). 

Hope this helps,


Scott Tarlow
Graduate Student
UC Davis, Earth and Planetary Sciences



More information about the CIG-MC mailing list