Git Product home page Git Product logo

Comments (16)

tingyang2004 avatar tingyang2004 commented on July 30, 2024 1

re-invited @julesghub

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

Hi Ting, I think the following line is the problem
if its == dT_maxIts - 1:

It will only fire when its == 4, which is what your output shows.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

Thanks, Julian.
You are right, this coding mistake occurred when I tried to simplify the original script.
However, this 'temperature difference does not decrease with reducing step interval' issue persists even when this coding mistake is corrected. See screenshots below.

image

image

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

The three columns of max_dT_Array in the standard output are iteration (its), dt, and dT_max, respectively.

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

In the code every iteration is using a different initial temperature and temperatureDot. This isn't what you want right?

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

I thought it is the same initial temperature and temperatureDot. Since I used
temperatureField.data[:] = T_old.data[:]
temperatureDotField.data[:] = Tdot_old.data[:]

to reset the temperature after each iteration.

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

oh I see. Why don't you create fields temperature0 and temperatureDot0 for the initial conditions. Just to ensure you don't have to write over the numpy arrays.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

How do I create and temperatureDot0 for the initial conditions?

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

The initial values of temperatureDot0 should always be zero. So I suggest
using temperatureDot0.data[:] = 0 in the loop.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

temperature reset in the while loop is changed as below:
temperatureField.data[:] = T_old.data[:]
temperatureDotField.data[:] = 0.0 #Tdot_old.data[:]

The temperature difference is as below, it does not show any dependence on dt.
image

At an earlier step, the temperature difference does reduce with reducing dt.
image

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

Instead of doing
T_old = temperatureField.copy()
Can you make T_old a new mesh variable, i.e.
T_old = mesh.add_variable(....)

I think the copy() is not a 'deep' copy and is potentially causing the issue.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

creating a new mesh variable for T_old does not make any difference. Values of the derived dT_max are exactly the same as before.

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

Can you upload a version of the model file and I can look at it more closely. The easiest way would be to make a private github repo and invite me to it. Remember to let me know the version of the code you're using.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

OK, I will do that.

from underworld2.

tingyang2004 avatar tingyang2004 commented on July 30, 2024

Hi Julian, I have invited you to my temporal repository. The swarm file exceeds the 25 Mb limit, so I shared it using my net-disk. You can download it through the link in README.md. Thanks!

from underworld2.

julesghub avatar julesghub commented on July 30, 2024

@tingyang2004 Could you re-invite me to the repo - unfortunately the invitation expired. opps

from underworld2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.