Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Flipping time when accessing Study 1 solution in Study 2

$
0
0
I'm trying to solve a time dependent optimal control problem in Comsol 4.3. The problem takes the form of

(g) two coupled nonlinear parabolic PDEs for the states

(g2) two coupled nonlinear parabolic PDEs for the controls

and, of course, there is some coupling between (g) and (g2), as well. As is usual in these problems, (g) has forward equations with initial conditions and (g2) has backward equations with final conditions.

I came across numerous things on the web by Neitzel, et. al., that feature the one-shot trick for *linear* problems like this in Comsol, but one can establish that this tactic does not work for this nonlinear problem.

So, I want to use what I understand is the "usual" tactic of (i) reversing time in (g2) so that the final conditions become initial conditions, (ii) iteratively solving (g2) and (g) using the solution of the variables from one problem as the input to the next iteration of the other. But the time-reversal step requires that a solution from (g), say u(x,t) is plugged into (g2) with t running in reverse, i.e. u(T-t). The transformation tau = T-t is used to reverse time in (g2), after all.

In Neitzel's work, with Comsol < 3.5a, he gives scripts that use "fliplr" to flip the solution array in time. Is a feature/transformation like this available in Comsol 4.3?

I tried using the link with Matlab, as well, by saving an m file and executing it in Matlab while linked. But it appears that there is no chance to flip a solution array within the script. The key Comsol piece that sets the way in which "variables that are not solved for in a study step" are given values doesn't seem to be accessible through this approach.

Can anybody help? If not in Comsol, can anybody point me to software that can solve these problems (with a relatively low learning curve or at all)?

David

Viewing all articles
Browse latest Browse all 26527

Trending Articles