How to create a copy of a pde model ?

1 回表示 (過去 30 日間)
Ivan
Ivan 2019 年 6 月 18 日
コメント済み: Manuel Gehmeyr 2021 年 9 月 9 日
My problem is the following. I have a pde model that I have to solve a large number of times in order to make it converge to the correct solution. So I create the model, create a mesh, and then apply boundary conditions and solve. However, for each iteration, only the boundary conditions have to change and the mesh stays the same. So I can save a lot of time if I don't re-calculate the mesh.
So after each iteration, I try to delete the current boundary conditions and create new ones. But it turns out the final result depends on what was calculated in the previous iteration, and I don't know why.
I thought an easy solution would be to copy the pde model right after creating the mesh, and apply new boundary conditions on that copy every time. But I could not find how to copy a pde model.
Anyone can help with this ?

回答 (1 件)

Ravi Kumar
Ravi Kumar 2019 年 6 月 18 日
Get hold of the handle that is provided as output, like:
bc = applyBoundaryCondition(....)
Now you can change the value for each iteration, using dot-assignment like,
bc.g = 1
Similarly for thermalBC or structuralBC.
  1 件のコメント
Manuel Gehmeyr
Manuel Gehmeyr 2021 年 9 月 9 日
I am still interested in the copy question for another reason.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeometry and Mesh についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by