Coral reefs are constructed by calcifying coral animals that engage in a symbiosis with dinoflagellate microalgae harboured in their tissue. The symbiosis takes place in the presence of steep and dynamic gradients of light, temperature and chemical species that are affected by the structural and optical properties of the coral and their interaction with incident irradiance and water flow. Microenvironmental analyses have enabled quantification of such gradients and bulk coral tissue and skeleton optical properties, but the multi-layered nature of corals and its implications for the optical, thermal and chemical microenvironment remains to be studied in more detail. Here, we present a multiphysics modelling approach, where three-dimensional Monte Carlo simulations of the light field in a simple coral slab morphology with multiple tissue layers were used as input for modelling the heat dissipation and photosynthetic oxygen production driven by photon absorption. By coupling photon, heat and mass transfer, the model predicts light, temperature and O
2
gradients in the coral tissue and skeleton, under environmental conditions simulating, for example, tissue contraction/expansion, symbiont loss via coral bleaching or different distributions of coral host pigments. The model reveals basic structure–function mechanisms that shape the microenvironment and ecophysiology of the coral symbiosis in response to environmental change.