- Solve the original PDE without perturbation for the required amount of time using “solvepde”
- Extract the solution data from the “Model” or “Result” object obtained from the first step. You can do this by a command like the following:
Problem introducing perturbation in PDE solution using solvepde from the Partial Differential Equations toolbox
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello.
I am solving a generic PDE using the solvepde function of the Partial Differential Equations toolbox. For the specific solution I need, I need to solve the PDE for a given amount of time, then introduce an external perturbation and resume the solving the PDE. I am having trouble introducing the external perturbation.
If I try to manually change the previous solution and use it as an input to setInitialConditions for the second step, I get an error: "Unable to set the 'NodalSolution' property of class 'TimeDependentResults' because it is read-only.".
If I add nodes to the model and manually change the PDE solution there, the solution surpringly does not converge...
I would welcome any help you could give on this, please. Many thanks,
Marta
0 comentarios
Respuestas (1)
Ayush Anand
el 29 de Ag. de 2023
Hi Marta,
I understand that you are solving a PDE, and after a given amount of time,you are trying to introduce some external perturbation and resume solving the PDE.
Here is how you could do the same:
intermediateSolution=results.NodalSolution
3. Now introduce the external perturbation in the solution data extracted above.
4.Create a new “Model” object using the same geometry and mesh as the original model used in step 1.
5.Use the “setInitialConditions” function to set the perturbed solution as the initial condition for the new model.
6.Solve the new model using “solvepde” again.
Assuming that you are trying a similar workflow as above, the error you are encountering might be because you are trying to set the “results.NodalSolution” parameter to the perturbed solutions for the second step instead of using the “setInitialConditons” function.
Please refer the following MathWorks Documentation for more information about Time-dependent PDE solutions and parameters like “NodalSolution”:
I hope this helps.
0 comentarios
Ver también
Categorías
Más información sobre General PDEs en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!