simulkade / JFVM.jl

A simple finite volume tool for Julia
Other
42 stars 13 forks source link

Cylindrical1D version of Nonlinear PDE example #6

Closed dharp closed 4 years ago

dharp commented 4 years ago

I am trying to convert the Nonlinear PDE example (https://nbviewer.jupyter.org/github/simulkade/JFVM.jl/blob/master/examples/solving-nonlinear-pdes-with-fvm.ipynb) to a Cylindrical1D mesh. The left (r=0) boundary is the standard (a=1,b=0,c=0) while the right boundary is a Robin BC. It appears that the Robin BC is working, but the left boundary holds the value (acts like a Dirichlet boundary) instead of allowing phi to drop. Perhaps I'm missing something in the conversion? The script is attached here: FV_polygon1Dradial.jl.zip

The output of the script looks like: Figure_1

But should look something more like: compare

simulkade commented 4 years ago

Hi Dylan,

Your script looks fine. Judging by the figures you have attached, it seems to me that the left boundary has not "sensed" the changes that are occurring due to the Robin condition at the right boundary. Have you tried increasing the time step?

Ali

On Mon, Apr 6, 2020 at 3:51 AM Dylan Robert Harp notifications@github.com wrote:

I am trying to convert the Nonlinear PDE example ( https://nbviewer.jupyter.org/github/simulkade/JFVM.jl/blob/master/examples/solving-nonlinear-pdes-with-fvm.ipynb) to a Cylindrical1D mesh. The left (r=0) boundary is the standard (a=1,b=0,c=0) while the right boundary is a Robin BC. It appears that the Robin BC is working, but the left boundary holds the value (acts like a Dirichlet boundary) instead of allowing phi to drop. Perhaps I'm missing something in the conversion? The script is attached here: FV_polygon1Dradial.jl.zip https://github.com/simulkade/JFVM.jl/files/4435492/FV_polygon1Dradial.jl.zip

The output of the script looks like: [image: Figure_1] https://user-images.githubusercontent.com/2457348/78516247-24795880-7776-11ea-8b01-9f654731d8f4.png

But should look something more like: [image: compare] https://user-images.githubusercontent.com/2457348/78516411-af5a5300-7776-11ea-8b0e-22632890f214.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/simulkade/JFVM.jl/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOLLRSOGU4F34ZULB4O4KTRLEYQ5ANCNFSM4MBYHGSA .

simulkade commented 4 years ago

This is what I got by increasing Kr to 50.0: image

dharp commented 4 years ago

Thank you for taking a look at this. Yes, you are exactly right. Everything seems to be working now.

Thanks, Dylan

From: Ali A Eftekhari notifications@github.com Reply-To: "simulkade/JFVM.jl" reply@reply.github.com Date: Monday, April 6, 2020 at 12:14 PM To: "simulkade/JFVM.jl" JFVM.jl@noreply.github.com Cc: "Harp, Dylan Robert" dharp@lanl.gov, Author author@noreply.github.com Subject: [EXTERNAL] Re: [simulkade/JFVM.jl] Cylindrical1D version of Nonlinear PDE example (#6)

This is what I got by increasing Kr to 50.0: [Image removed by sender. image]https://user-images.githubusercontent.com/1881542/78591102-35dc6680-7843-11ea-9c7e-a65c6694f132.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/simulkade/JFVM.jl/issues/6#issuecomment-609954976, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AASX6BEG2DZGHRF444IKE7TRLILZPANCNFSM4MBYHGSA.

simulkade commented 4 years ago

No problem, Dylan. Feel free to open new issues if you run into problem. I've been very lazy documenting this code.