# How to apply dynamic core to a model with a rectangular geometry?

**URL:** https://community.geodynamics.org/t/how-to-apply-dynamic-core-to-a-model-with-a-rectangular-geometry/1719
**Category:** ASPECT
**Created:** [March 9, 2021, 5:25am UTC](https://community.geodynamics.org/t/how-to-apply-dynamic-core-to-a-model-with-a-rectangular-geometry/1719 "2021-03-09T05:25:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Xie](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/xie/32/707_2.png) [@Xie](https://community.geodynamics.org/u/Xie)
#### Post date: [March 9, 2021, 5:25am UTC](https://community.geodynamics.org/t/how-to-apply-dynamic-core-to-a-model-with-a-rectangular-geometry/1719/1 "2021-03-09T05:25:29Z")

</div>

Hi,

For the purpose of performing a more realistic simulation, i’d like to know how to apply the temperature boundary condition like dynamic core to a model with a rectangular geometry?

Best,  
Xie

---

<div class="post-metadata">

### Author: ![bangerth](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/bangerth/32/52_2.png) [@bangerth](https://community.geodynamics.org/u/bangerth)
#### Post date: [March 9, 2021, 8:49am UTC](https://community.geodynamics.org/t/how-to-apply-dynamic-core-to-a-model-with-a-rectangular-geometry/1719/2 "2021-03-09T08:49:05Z")

</div>

Xie,  
the dynamic core model was specifically made for the spherical shell geometry. If you wanted to apply it to a rectangular geometry, you will have to read through the source code of this model and consider how to adjust it to your needs. I don’t think it can be done purely from the .prm file.

Best  
Wolfgang

---

<div class="post-metadata">

### Author: ![Xie](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/xie/32/707_2.png) [@Xie](https://community.geodynamics.org/u/Xie)
#### Post date: [March 14, 2021, 7:48am UTC](https://community.geodynamics.org/t/how-to-apply-dynamic-core-to-a-model-with-a-rectangular-geometry/1719/3 "2021-03-14T07:48:58Z")

</div>

Hi, Prof.

Indeed, just modify the .prm file is not enough, i studied the dynamic\_core.h && dynamic\_core.cc. My thoughs/questions are:

1. Manually enter the value of Rc (i.e., the radius of CMB) from the .prm file instead of automatically reading it from inner\_radius() function.
2. The key to this issue seems to be in the update() function, especially the snippet of code starting from line 657 (_calculate core mantle boundary heat flow_) if I understand it correctly. Assuming the geometry is box now, can i directly modify ‘if(cell-\>face(f)-\>boundary\_id() == CMB\_id)’ to ‘if(cell-\>face(f)-\>boundary\_id() == id\_of\_bottom)’ ?

Or is there any other way to make up a spherical shell under the box ?

Best,  
Xie
