Skip to content

Conversation

mdpiper
Copy link
Member

@mdpiper mdpiper commented May 19, 2020

This PR includes a slight change to the way temperature is diffused in the Heat model.

To show this, start with a 6x8 temperature array with an impulse of 100 at [3,4]:

[[ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0. 100.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]]

Advance the model by one time step.
In the original formulation, this gives:

[[ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.  25.   0.   0.   0. ]
 [ 0.   0.   0.  25.   0.  25.   0.   0. ]
 [ 0.   0.   0.   0.  25.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]]

In the updated formulation, this gives:

[[ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]
 [ 0.   0.   0.   0.  12.5  0.   0.   0. ]
 [ 0.   0.   0.  12.5 50.  12.5  0.   0. ]
 [ 0.   0.   0.   0.  12.5  0.   0.   0. ]
 [ 0.   0.   0.   0.   0.   0.   0.   0. ]]

In each case, temperature is conserved, but in the second case, the diffusion is less rapid.

@mdpiper mdpiper merged commit 46e5221 into master May 19, 2020
@mdpiper mdpiper deleted the mdpiper/change-diffusion-coeff branch May 19, 2020 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant