-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create incompressible_viscous solver and lid-driven cavity test problem #138
Create incompressible_viscous solver and lid-driven cavity test problem #138
Conversation
can you address those test failures (isort and flake8) |
can you add the name of the solver to the Also, we should add some description to the docs -- if you are comfortable with Sphinx you can do so, otherwise, we can address that in a separate PR |
pyro_sim.py incompressible shear inputs.shear | ||
|
||
|
||
.. image:: shear.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to git add all the images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has this been resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! All the images are there, the page should load fine.
Here's the incompressible/shear problem, but run with the incompressible_viscous solver with viscosity=0, which should yield the same solution (link to original plot) But we get a different result! Something weird is going on at the boundaries... |
to be second-order accurate, when you do the interface state prediction, you'll need to add a viscous term to the predictor. This will come in as 0.5 dt * nu L U and enter in the same place that gradp_x and gradp_y do now in states. |
are you making that with plot.py? I think the issue at the boundaries is due to the ghost cells. Maybe we need to fill them in plot.py |
Yes I am, so maybe it's fine then |
I basically split up the original So I think you can create a function that takes in the left and right interface states and
into that function, something like Then you would get the original |
@@ -36,6 +36,7 @@ pyro: a python hydro code | |||
multigrid | |||
diffusion_basics | |||
incompressible_basics | |||
incompressible_viscous_basics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think incompressible_viscous_basics
is really an extension of incompressible
solver, so it might be better to just add subsections in incompressible_basics
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there are no conflicts and it works, let's merge this and then we can clean it up (by subclassing incompressible, e.g.) in a separate PR. |
Needed to change a few things in
incompressible/simulation.py
as well:The latter two are then redefined in
incompressible_viscous/simulation.py
. The rest of the methods are inherited from the base class.For the lid-driven cavity problem, the only free parameter is the viscosity. Since the velocity and length scales are =1, the Reynolds number is just 1/viscosity.
For Re=400, after 5 characteristic timescales, this is the result