efficient way to call advection solver repeatedly with just advection speed change( same state,domain, solver)?

10 views
Skip to first unread message

Ryan Vogt

unread,
Mar 2, 2018, 12:54:27 PM3/2/18
to claw-users
Hey

Just curious can I reset a controller somehow. My issue is that I'm trying to solve numerous advection equations one after another with different advection speeds. I don't want to keep on reconstructing the mesh, just change the speed and reconstruct the new solution for that speed. It appears there is an issue with the reset for some reason - my solution does not move even though there is a non-zero advection speed. What I mean by this, is if I integrate my solution over my time and spatial interval solution is x-ct on spatial interval [-1,1] and time interval [0,1] I find which each number is for a different run. The first run goes great, I calculate the analytic integral, and for this time and space domain, the integral is exactly negative the speed(using trapezoid).  after that for some reason when I try after that I get a solution that doesn't move. This would result me in getting 0 as an integral. I attached my code if you wanted to see. 



speed

1.25136144423

integral over time and space domain 

-1.24510463701

-----

-----

speed

0.500326948776

integral over time and space domain 

-0.0

-----

-----

speed

1.23382900749

integral over time and space domain 

-0.0

-----

advection_solver.py

Kyle Mandli

unread,
Mar 2, 2018, 1:21:00 PM3/2/18
to claw-users
Once you have setup the controller the way you wanted you could make additional copies, however many you would need.  Alternatively if you do not need the capabilities of the controller (sounds like you might not) you could just duplicate the solver and tell it to evolve to the time you are interested in.

Kyle
--
You received this message because you are subscribed to the Google Groups "claw-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to claw-users+...@googlegroups.com.
To post to this group, send email to claw-...@googlegroups.com.
Visit this group at https://groups.google.com/group/claw-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages