Giter Club home page Giter Club logo

taichi-ferrofluid's Introduction

taichi-ferrofluid's People

Contributors

g1n0st avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

taichi-ferrofluid's Issues

Residual becomes nan after few iter steps

I tried run your project by python main_2d.py and used configs as below:

res = 8
solver = FerrofluidSimulator(2, (res, res), 1e-4, 1, 3.1250e-3)
# initializer = SphereInitializer2D(res, 0.5, 0.5, 0.2)
x0, y0, x1, y1 = 0.08, 0.2, 0.92, 0.45
initializer = Initializer2D(res, x0 + 0.03, y0 + 0.035, x1 - 0.02, y1 - 0.02, \
        [[x0, y0, x1, y0 + 0.02], \
         [x0, y0 + 0.02, x0 + 0.02, y1 + 0.02],
         [x1 - 0.02, y0 + 0.02, x1, y1 + 0.02]])
visualizer = GUIVisualizer2D(res, 512, 'levelset', show_gui=False, output=True, text=True)
solver.initialize(initializer)
# print('self.sum after init:', solver.poisson_solver.sum[None])
solver.run(max_steps=50, visualizer=visualizer, verbose=True)
# ti.kernel_profiler_print()

But I got residual nan after first few steps:
image
I suspect that solver.poisson_solver.sum is the problem, as I found it very big after MGPCGPoissonSolver.reduce, but I'm not sure.
Could you please help me locate the problem? Thanks

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.