
Codes: Random (3 phases): The code can be run once to generate two text files (componentsx and componentsy), i.e. a resistor networks in both directions. Importing these files into the circuit simulator allows a calculation to be performed. line 4: the first number represents the network size (n); the second number represents the resistance values of second mineral phases (Plagioclase or Clinopyroxene); the third number represents the number of second mineral phases in the network. line 5: the first number represents the resistance values third mineral phases (Amphibole or Quartz); the second number represents the number of third mineral phases in the network. lines 7 to 28: the distribution functions of electrical anisotropy for first minerals (Qtz or Plag). Layering (Middle crust)-three phases: the code generates compenents20x and components20y. line 4: the first number represents the network size (n); the second number represents the resistance values of second mineral phases (Plagioclase); the third number is none; the 4-7th numbers represent the number of second mineral phases in different layers. line 5: the first number represents the resistance values of third mineral phases (Amphibole); the 2-5th numbers represent the number of third mineral phases in different layers. lines 7 to 33: the distribution functions of electrical anisotropy for Quartz. Layering (Lower crust)-three phases: the code generates a resistor network consisting of 10 layers. line 4: the parameters for second mineral phases (Clinopyroxene). line 5: the parameters for third mineral phases (Quartz). lines 7 to 23: the distribution functions of electrical anisotropy for Plagioclase. Fluid/melt-bearing models is similar to layering calculations.
