doc:user:remeshing:remeshing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:user:remeshing:remeshing [2016/06/13 16:36] – [CopyRemesher] joris | doc:user:remeshing:remeshing [2016/06/14 18:15] – [Options] joris | ||
---|---|---|---|
Line 29: | Line 29: | ||
Which is why all of this has been kindly automatized, | Which is why all of this has been kindly automatized, | ||
- | ===== How does FENRIR | + | ===== How does remeshing |
First, you need to have an operational 2D test case, and the will to introduce remeshing into it. | First, you need to have an operational 2D test case, and the will to introduce remeshing into it. | ||
Line 258: | Line 258: | ||
| | ||
autoRemesh.setBalancing(True) | autoRemesh.setBalancing(True) | ||
- | | + | |
+ | autoRemesh.makeAnim = False | ||
+ | | ||
autoRemesh.execute() | autoRemesh.execute() | ||
| | ||
Line 272: | Line 274: | ||
* '' | * '' | ||
| | ||
- | * Finally, the line '' | + | * The line '' |
+ | |||
+ | * Finally, the line '' | ||
Now that you have altered your test case to include remeshing, and that you have defined this little script, all that remains is to launch Metafor and execute your script (execute, not load/meta). Everything should work out perfectly. | Now that you have altered your test case to include remeshing, and that you have defined this little script, all that remains is to launch Metafor and execute your script (execute, not load/meta). Everything should work out perfectly. | ||
Line 301: | Line 305: | ||
==== Changing the critical remeshing value during the computation ==== | ==== Changing the critical remeshing value during the computation ==== | ||
- | It may be possible that we want to change the critical value after a few remeshing. If you recall, this value is defined in the [[# | + | It may be possible that we want to change the critical value after a few remeshing |
However, since the same two files are used to generate all the remeshing, it is not possible to know how far in the computation we are. But to change the critical value, we need to know whether the current integration is the first or the tenth. | However, since the same two files are used to generate all the remeshing, it is not possible to know how far in the computation we are. But to change the critical value, we need to know whether the current integration is the first or the tenth. | ||
Line 335: | Line 339: | ||
==== Changing mesh density during the computation ==== | ==== Changing mesh density during the computation ==== | ||
- | Actually, the key '' | + | Actually, the key '' |
if p[' | if p[' | ||
Line 346: | Line 350: | ||
Two different remeshing criteria have been implemented yet, one based on a '' | Two different remeshing criteria have been implemented yet, one based on a '' | ||
- | Previously, the one relying on a valueExtractor was used in a very simple way : on one side of the part, with the field '' | + | Previously, the one relying on a '' |
#Stop Criterion | #Stop Criterion | ||
Line 359: | Line 363: | ||
But then, there is also a simple criterion based on time, if you want to remesh every few seconds or so. | But then, there is also a simple criterion based on time, if you want to remesh every few seconds or so. | ||
- | In this case, you must first define a vector containing all the times at which you want to remesh ('' | + | In this case, you must first define a vector containing all the times at which you want to remesh ('' |
def getParameters(_p={}): | def getParameters(_p={}): | ||
Line 415: | Line 419: | ||
CopyRemesher(side, | CopyRemesher(side, | ||
- | Therefore, if you have a complex domain, just divide it into the appropriate sides and copy/remesh as you see fit. | + | Therefore, if you have a complex domain, just divide it into the appropriate sides and copy/remesh as you see fit. However, when you want to remesh one side, copy another side, and that the two sides have a common edge, then you must first use CopyRemesher, |
- | + | ||
- | < | + | |
==== Transfinite Meshers ==== | ==== Transfinite Meshers ==== | ||
- | Sometimes, it is useful to first mesh curves using the [[doc: | + | Sometimes, it is useful to first mesh curves using the [[doc: |
+ | |||
+ | You can, however, use transfinite meshers to define your first, initial mesh. This initial mesh can indeed be created using any configuration of meshers one can think of. However, reading the results afterwards is going to be annoying. | ||
- | At this point, it is not possible | + | For example, let us assume that TransfiniteMesher2D |
+ | For the others integrations, Gen4Remesher is used, and a mesh file is saved, so reloading | ||
- | Also, you cannot remesh using [[doc: | + | However, when loading a fac, there is no way to know which operations should be done, executing the transfinite |
===== Data Transfer ===== | ===== Data Transfer ===== | ||
Line 431: | Line 436: | ||
By default, the transfer of data is done using Philippe' | By default, the transfer of data is done using Philippe' | ||
- | For the advanced | + | For the __advanced__ |
==== Changing the transfer method ==== | ==== Changing the transfer method ==== | ||
Line 463: | Line 468: | ||
cell.addOption(INTPT_NB, | cell.addOption(INTPT_NB, | ||
- | To understand all these options, please look at [[doc: | + | To understand all these options, please look at [[doc: |
==== Changing the fields to transfer ==== | ==== Changing the fields to transfer ==== | ||
- | The list of fields which must be transferred is defined by default. If, amongst | + | The list of fields which must be transferred is defined by default. If, among these fields, some are not to be transferred, |
autoRemesh = AutomaticRemeshing(getMetafor, | autoRemesh = AutomaticRemeshing(getMetafor, | ||
Line 485: | Line 490: | ||
| | ||
autoRemesh.setInteractionToPostStep(101) | autoRemesh.setInteractionToPostStep(101) | ||
+ | autoRemesh.setInteractionToPostStep(102) | ||
- | will recompute all contact properties on the interaction 101. | + | will recompute all contact properties on the interaction 101 and 102. |
===== Balancing ===== | ===== Balancing ===== | ||
Line 518: | Line 524: | ||
$\boldsymbol{F}^{int}=\boldsymbol{F}^{ext}$ | $\boldsymbol{F}^{int}=\boldsymbol{F}^{ext}$ | ||
- | After remeshing and data transfer, this equation is no longer true, so we have (where the $\boldsymbol{F}_t$ means force after transfer) | + | After remeshing and data transfer, this equation is no longer true, so we have (where the index $t$ in $\boldsymbol{F}_t$ means that we consider the value after transfer) |
$\boldsymbol{F}^{unbal} = \boldsymbol{F}^{int}_t - \boldsymbol{F}^{ext}_t$ | $\boldsymbol{F}^{unbal} = \boldsymbol{F}^{int}_t - \boldsymbol{F}^{ext}_t$ | ||
- | The post-remeshing algorithm is simply a variation of the quasi-static integration scheme where this imbalance is to be solved. First, we simply try to solve the equation as it is. If it works, then the imbalance is corrected and the real integration can start again. If it does not work, then an increasing fraction of the unbalanced forces are applied as external forces, in order to solve the imbalance little by little. | + | The post-remeshing algorithm is simply a variation of the quasi-static integration scheme where this imbalance is to be solved. First, we simply try to solve the equation as it is. If it works, then the imbalance is corrected and the real integration can start again. If it does not work, then an increasing fraction of the unbalanced forces are applied as external forces, in order to solve the imbalance little by little. Once verified for a given fraction, the the unbalanced forces are recomputed and the algorithm started again, until equilibrium is restored. |
Mathematically, | Mathematically, | ||
Line 538: | Line 544: | ||
$$ = (1-\alpha_F) \boldsymbol{F}^{\text{ext}}(t^{n+1}) + \alpha_F \boldsymbol{F}^{\text{ext}}(t^n)$$ | $$ = (1-\alpha_F) \boldsymbol{F}^{\text{ext}}(t^{n+1}) + \alpha_F \boldsymbol{F}^{\text{ext}}(t^n)$$ | ||
- | The idea is similar : after remeshing, there is some imbalance and the equation is no longer verified, so we want to apply a balancing algorithm to restore equilibrium before restarting the computation. Since the time is stopped, inertial forces are kept as they are and only internal forces are modified to satisfy equilibrium. In the same way as for a quasi-static simulation, this is done by applying as external forces an increasing fraction of the unbalanced forces. | + | The idea is similar : after remeshing, there is some imbalance and the equation is no longer verified, so we want to apply a balancing algorithm to restore equilibrium before restarting the computation. Since the time is stopped, inertial forces are kept as they are and only internal forces are modified to satisfy equilibrium. In the same way as for a quasi-static simulation, this is done by applying as external forces an increasing fraction of the unbalanced forces. The difference with respect to the quasi-static algorithm is the expression of the unbalanced forces, which will here also contains the inertial forces and the forces computed at the previous time step. |
Since we conserve the inertial forces and correct the internal ones, this post-remeshing algorithm works quite well for quasi-static and low speed dynamic computations. For high speed dynamic computations, | Since we conserve the inertial forces and correct the internal ones, this post-remeshing algorithm works quite well for quasi-static and low speed dynamic computations. For high speed dynamic computations, | ||
+ | |||
+ | ==== Options ==== | ||
+ | |||
+ | The complete '' | ||
+ | |||
+ | setBalancing(executeBalancing, | ||
+ | | ||
+ | The first argument has already been described and indicates whether balancing should be done or not. | ||
+ | |||
+ | For the advanced user, a few options can be played with by changing the three of arguments. | ||
+ | |||
+ | First of all, it is possible to deactivate the '' | ||
+ | |||
+ | Second, the number of iterations for each step of the balancing can be changed. By default, seven iterations are tried before increasing the fraction of the unbalanced forces and starting again. | ||
+ | |||
+ | Finally, the tolerance can also be changed. The parameter $\alpha$, used to ponder the unbalanced forces, starts at 1 and is progressively divided by 2 when a step fails. Once $\alpha$ becomes smaller than the tolerance, the algo stops itself, returns an error, and the temporal integrationdoes not restart. The default value of 0.001 can be changed if needed. | ||
+ | |||
+ | --- // |
doc/user/remeshing/remeshing.txt · Last modified: 2018/05/04 15:47 by boman