idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.78k stars 1.05k forks source link

Initial spatial adaptivity for a transient problem #3779

Open YaqiWang opened 10 years ago

YaqiWang commented 10 years ago

I currently have a transient problem, which has 1) zero initial condition; 2) very sharp gradient at one of the boundary when the transient starts. Actually the problem is a well-known thermal radiation benchmark called as Marshak wave problem.

I need an adapted mesh to capture this sharp gradient but cannot use the initial condition for generating the adapted mesh.

I am proposing to do multiple steps of solves at the first time step if required by the users to generate an adapted mesh to start with. We do not need to do multiple steps for later time steps.

aeslaughter commented 10 years ago

Just to keep the design discussion going on the issue rather than the PR, I am re-stating a few things.

If this was to be implemented, I would like to see a more general behavior so that at any step (or time) the user could specify additional adaptation, this would allow for handling a shock event that happens sometime during the solve, not just at the beginning.

I ask this to the moose team: is these a feature we want to implement? If so, I can work on this along with re-implementing the time interval handling (#3487).

permcody commented 10 years ago

The time interval handling is very complex. It's more complex than implementing block/boundary restrictable variables. As soon as we support time intervals again, every place in the system where there is an accessor (getProperty(), getVariable(), getObject()), now you have to take time into account. Besides how would you know when the shock would occur? I think a better approach would be to let the system decide when more adaptive steps are needed based on total error between refinement steps or some other indicator. We could easily add a callback to the Indicator/Marker system that would allow a custom object to make a physics-based decision.

aeslaughter commented 10 years ago

I like the physics-based decision, but it is reasonable to know when a shock happens. Yaqi has an example in this issue, there also may be some sort of drastic change in load at a known time (e.g., earthquake data in a structural analysis).

YaqiWang commented 10 years ago

I actually forgot one call before doing the adaptation in my PR so the new adaptation system will not work. Just keep this in mind: _problem.computeIndicatorsAndMarkers();

friedmud commented 10 years ago

I am not really for this whole idea. There are easier ways to achieve this using initial adaptivity. Here are a few options:

  1. Use uniform_refine to create a nice fine mesh everywhere to start with - then let it coarsen back over the first few steps.
  2. Use BoxMarker to just select the portion of the domain where you think you need fine mesh and do a few steps of initial adaptivity.
  3. If you know you need fine mesh along a certain boundary create a BoundaryMarker that does that and use it with a few steps of initial adaptivity. This would be a nice general capability that would be welcome in MOOSE.

Basically: The initial adaptivity system already exists to give you this capability.... use it! :smile:

friedmud commented 9 years ago

@YaqiWang what is the status on this? Can we close it?

Also: I feel like #5229 will help this kind of thing because you can have multiple adaptivity cycles per step...

YaqiWang commented 9 years ago

I still need this for a radiative heat transfer benchmark in general. But because I know where need to be refined for the benchmark, I can use BoxMarker. Yes, if the executioner is refactored, we possibly can achieve this differently or more correctly. We might need to make users able to control the maximum adaptivity cycles during transient. Feel free to close this if you want.

permcody commented 9 years ago

Yaqi, you can control the number of adaptivity cycles per step. I forget the parameter name, but it's in there.

Cody On Mon, Jun 15, 2015 at 10:45 AM Yaqi notifications@github.com wrote:

I still need this for a radiative heat transfer benchmark in general. But because I know where need to be refined for the benchmark, I can use BoxMarker. Yes, if the executioner is refactored, we possibly can achieve this differently or more correctly. We might need to make users able to control the maximum adaptivity cycles during transient. Feel free to close this if you want.

— Reply to this email directly or view it on GitHub https://github.com/idaholab/moose/issues/3779#issuecomment-112114912.