Skip to content

sigma_x and sigma_t in heat1D/heat1D.py #2

@smao-astro

Description

@smao-astro

Hi,

In the line below

def operator(u, t, x, k, sigma_t=1.0, sigma_x=1.0):
u_t = tf.gradients(u, t)[0] / sigma_t
u_x = tf.gradients(u, x)[0] / sigma_x
u_xx = tf.gradients(u_x, x)[0] / sigma_x
residual = u_t - k * u_xx
return residual

I have two question:

  1. Seems that when the function is called
    def net_r(self, t, x):
    u = self.net_u(t, x)
    residual = self.operator(u, t, x, self.k,
    self.sigma_t, self.sigma_x)
    return residual

    you give slightly different sigma_x and sigma_t, does not that break the balance of the equation?
  2. Why sigma_x occurred twice in the second term (spatial 2nd derivative)? Does this mean that you are actually changing the PDE you are solving?

In addition, I got an output below that seems different comparing with the figure 12 in the paper (using heat1D_ST_FF), do you have any idea?
heat1d_output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions