Please login with a confirmed email address before reporting spam
Hi,
There are two distinct questions.
Time Derivatives
A state variable defined in an external material should be possible to access everywhere. However, you cannot use the built-in time derivative operator on a state variable. There are a few tricks that you can use, however.
One is to compute the time derivative yourself in the external material function, and store as an extra state. This is probably easiest.
Also, you can create another field outside of the external material, to which you map your state. For mapping, you can use a weak expression like
(my_new_S1-nojac(extmat1.state.S1))*test(my_new_S1)
As the new field is an ordinary degree of freedom, it can be differentiated with respect to time.
Plotting the Principal Vectors
Here it becomes tricky.
States as such 'live' at the Gauss points. When accessed from other locations, then it is possible that your external material is called and evaluated in that other point.
I suggest that you experiment with switching on and off averaging between elements. (Smoothing), and also to add vector plots to figure out what is going on. Try plotting individual components too.
One possible explanation is that the vector is pointing out of the plane somewhere. Then, the norm of the in-plane components is no longer 1 as assumed. Remember that the function csext_eig assumes full 3D.
-------------------
Henrik Sönnerlind
COMSOL
Hi,
There are two distinct questions.
**Time Derivatives**
A state variable defined in an external material should be possible to access everywhere. However, you cannot use the built-in time derivative operator on a state variable. There are a few tricks that you can use, however.
One is to compute the time derivative yourself in the external material function, and store as an extra state. This is probably easiest.
Also, you can create another field outside of the external material, to which you map your state. For mapping, you can use a weak expression like
(my_new_S1-nojac(extmat1.state.S1))\*test(my_new_S1)
As the new field is an ordinary degree of freedom, it can be differentiated with respect to time.
**Plotting the Principal Vectors**
Here it becomes tricky.
States as such 'live' at the Gauss points. When accessed from other locations, then it is possible that your external material is called and evaluated in that other point.
I suggest that you experiment with switching on and off averaging between elements. (Smoothing), and also to add vector plots to figure out what is going on. Try plotting individual components too.
One possible explanation is that the vector is pointing out of the plane somewhere. Then, the norm of the in-plane components is no longer 1 as assumed. Remember that the function csext_eig assumes full 3D.