I just started to use ASPECT. Thank you very much for seeing this topic. I want to set the composition fields like this

No matter how I set the parmeter “phi”, it doesn’t work. I don’t know which parmeter lead to this wrong solutions. All paarmeters are attached in the end of this topic, my parmeters in subsection “Initial composition model” and output are as following:

```
#---------------Compositional fields model---------------#
subsection Compositional fields
set Number of fields = 2
end
subsection Initial composition model
set Model name = function
subsection Function
set Coordinate system = spherical
set Variable names = r,theta,phi
#set Function expression = if((r>1637000) && (phi<3.14159) && (phi>0), 1, 0) ; if((r>1400000) && (r<1537000) && (phi<1) && (phi>0), 1, 0)
set Function expression = if((r>1637000 && phi<3.14), 1, 0) ; if((r>1400000 && r<1537000 && phi<1.55), 1, 0)
end
end
```

Initial C_1 Fields:(No more pictures can be inserted, so I put it on Drawing bed)

C_1 output

Initial C_2 Fields:

C_2 output

Even if I replace the Initial composition model subsection “phi” by “theta”, it also don’t appear the initial composition as I wanted.

I really don’t know how to set the Initial composition model. I’d be grateful to you for answering my question.

Parmeter file:

```
#--------------------Global Parameters-------------------#
set Dimension = 2
set End time = 1.5e8
set Use years in output instead of seconds = true
set Output directory = output-Luna01
#---------------Adiabatic conditions model---------------#
#--------------------Material model----------------------#
subsection Material model
set Model name = composition reaction
subsection Composition reaction model
set Thermal expansion coefficient = 4e-5
set Viscosity = 1e22
set Composition viscosity prefactor 1 =0.1
set Composition viscosity prefactor 2 =0.3
set Density differential for compositional field 1 = 500
set Density differential for compositional field 2 = 200
end
end
#--------------------Initial model----------------------#
subsection Initial temperature model
set Model name = spherical hexagonal perturbation
end
subsection Gravity model
set Model name = radial constant
subsection Radial constant
set Magnitude = 1.89
end
#set Model name = ascii data
# subsection Ascii data model
# set Data directory = ./gravity_data/
# set Data file name = prem.txt
# end
end
#----------Geometry model and Mesh refinement------------#
subsection Geometry model
set Model name = spherical shell
subsection Spherical shell
set Inner radius = 350000
set Outer radius = 1737000
set Opening angle = 360
end
end
subsection Mesh refinement
set Initial global refinement = 5
set Initial adaptive refinement = 4
set Strategy = composition
set Time steps between mesh refinement = 15
end
#--------------------Boundary Condition----------------------#
subsection Boundary velocity model
set Zero velocity boundary indicators = bottom
set Tangential velocity boundary indicators = top
end
subsection Boundary temperature model
set Fixed temperature boundary indicators = top, bottom
set List of model names = spherical constant
subsection Spherical constant
set Inner temperature = 4273
set Outer temperature = 973
end
end
#---------------Compositional fields model---------------#
subsection Compositional fields
set Number of fields = 2
end
subsection Initial composition model
set Model name = function
subsection Function
set Coordinate system = spherical
set Variable names = r,theta,phi
#set Function expression = if((r>1637000) && (phi<3.14159) && (phi>0), 1, 0) ; if((r>1400000) && (r<1537000) && (phi<1) && (phi>0), 1, 0)
set Function expression = if((r>1637000 && phi<3.14), 1, 0) ; if((r>1400000 && r<1537000 && phi<1.55), 1, 0)
end
end
#---------------------Postprocess------------------------#
subsection Postprocess
set List of postprocessors = visualization, temperature statistics, composition statistics
subsection Visualization
set Output format = vtu
set Time between graphical output = 1.5e7
set Number of grouped files = 0
end
subsection Depth average
set Time between graphical output = 1.5e7
end
end
```