Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 27, 2015, 10:36 a.m. EDT
Just to update... I think it's working now. The key was to define a variable for the surface (in each axis) and to use the nojac operator to ensure that the previous solution was used.
For example: surface_disp_u=nojac(u)
Then this variable is used directly as a prescribed displacement on the surface of interest, which I set up in a separate physics interface to the one used for the first solution.
This worked in conjunction with setting the initial condition of the dependent variables to the previous solution.
Hopefully that helps someone else in this predicament.
Thanks,
Daniel
Just to update... I think it's working now. The key was to define a variable for the surface (in each axis) and to use the nojac operator to ensure that the previous solution was used.
For example: surface_disp_u=nojac(u)
Then this variable is used directly as a prescribed displacement on the surface of interest, which I set up in a separate physics interface to the one used for the first solution.
This worked in conjunction with setting the initial condition of the dependent variables to the previous solution.
Hopefully that helps someone else in this predicament.
Thanks,
Daniel
Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 27, 2015, 11:09 a.m. EDT
Hi,
Some comments:
The initial value which you set in the second study is only an initial value. So without the load, the solution will bounce back to the zero state. An initial value can have either of two purposes:
1. Initial condition for a transient analysis
or
2. Provide the solver with a good initial guess for a nonlinear problem.
Here is a somewhat easier solution, which does not require two different interfaces, and no initial values. As I understand your question, you want to run two frequency domain analyses, where results from the first one act as boundary conditions for the second one.
1. Add two studies, each with a Frequency Domain study step.
2. Add a Prescribed Velocity feature which is used only in the second study, and disable the force load in that study. You can of course just as well use Prescribed Displacement, it is just a matter of choice which variable you transfer.
3. In the Prescribed Velocity, you can use the withsol() operator (new in version 5.1) to point to any other solution. The input field in the Prescribed Velocity in the x-direction should be something like withsol('sol1',solid.u_tX,setval(freq,freq)).
4. Make sure that the Prescribed Velocity (or Displacement) is switched off in the first study.
Regards,
Henrik
Hi,
Some comments:
The initial value which you set in the second study is only an initial value. So without the load, the solution will bounce back to the zero state. An initial value can have either of two purposes:
1. Initial condition for a transient analysis
or
2. Provide the solver with a good initial guess for a nonlinear problem.
Here is a somewhat easier solution, which does not require two different interfaces, and no initial values. As I understand your question, you want to run two frequency domain analyses, where results from the first one act as boundary conditions for the second one.
1. Add two studies, each with a Frequency Domain study step.
2. Add a Prescribed Velocity feature which is used only in the second study, and disable the force load in that study. You can of course just as well use Prescribed Displacement, it is just a matter of choice which variable you transfer.
3. In the Prescribed Velocity, you can use the withsol() operator (new in version 5.1) to point to any other solution. The input field in the Prescribed Velocity in the x-direction should be something like withsol('sol1',solid.u_tX,setval(freq,freq)).
4. Make sure that the Prescribed Velocity (or Displacement) is switched off in the first study.
Regards,
Henrik
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 27, 2015, 11:15 a.m. EDT
Great, thanks, yes, that withsol operator sounds like just the ticket, so it's interesting that it's only just become an option!
I had some issues installing 5.1 so had stuck with 5.0, but might upgrade for that.
Thanks very much,
Daniel
Great, thanks, yes, that withsol operator sounds like just the ticket, so it's interesting that it's only just become an option!
I had some issues installing 5.1 so had stuck with 5.0, but might upgrade for that.
Thanks very much,
Daniel
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 27, 2015, 5:57 p.m. EDT
I had to update to use the new withsol operator, because whilst I got it working, it was only working for the last solution... the withsol allows me to specify the frequency to use. I'm very happy now it's working great for my whole frequency domain study.
One last question... I needed to specify the 'tag' for the solution. Only through some trial and error did I find that the tag I needed was "sol1", but I could not find any other reference to this. Where can I find the tag values for my solutions?
Thanks very much in advance.
Daniel
I had to update to use the new withsol operator, because whilst I got it working, it was only working for the last solution... the withsol allows me to specify the frequency to use. I'm very happy now it's working great for my whole frequency domain study.
One last question... I needed to specify the 'tag' for the solution. Only through some trial and error did I find that the tag I needed was "sol1", but I could not find any other reference to this. Where can I find the tag values for my solutions?
Thanks very much in advance.
Daniel
Henrik Sönnerlind
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 28, 2015, 2:18 a.m. EDT
Hi,
If you right-click on the Solution node and select Properties, you will see the tag.
Alternatively, you can switch on the display of all tags. With the rightmost icon at the top of the Model Builder pane you can control the annotation of the nodes in the model tree.
By the way, the syntax
withsol('sol1',solid.u_tX,setval(freq,freq))
may look a bit obscure. The first 'freq' indicates that you want to pick results at a certain frequency in the old solution (sol1). The second 'freq' is the current frequency in the frequency sweep you are solving for in the second study..
By using
withsol('sol1',solid.u_tX,setval(freq,123.4))
you would pick the old result at the single frequency 123.4 Hz.
Regards,
Henrik
Hi,
If you right-click on the Solution node and select Properties, you will see the tag.
Alternatively, you can switch on the display of all tags. With the rightmost icon at the top of the Model Builder pane you can control the annotation of the nodes in the model tree.
By the way, the syntax
withsol('sol1',solid.u_tX,setval(freq,freq))
may look a bit obscure. The first 'freq' indicates that you want to pick results at a certain frequency in the old solution (sol1). The second 'freq' is the current frequency in the frequency sweep you are solving for in the second study..
By using
withsol('sol1',solid.u_tX,setval(freq,123.4))
you would pick the old result at the single frequency 123.4 Hz.
Regards,
Henrik
Ivar KJELBERG
COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 28, 2015, 10:36 a.m. EDT
Hi Henrik
Thanks for the clarifications, these new built-in operators are explained at p227++ in the COMSOL Reference Manual V5.1 and in the Help, but its always easier to see them in use in several examples :)
--
Good luck
Ivar
Hi Henrik
Thanks for the clarifications, these new built-in operators are explained at p227++ in the COMSOL Reference Manual V5.1 and in the Help, but its always easier to see them in use in several examples :)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
Jul 28, 2015, 10:45 a.m. EDT
Yes, thanks for all the clarifications. My results are looking good now :-)
I find the reference help is good if you know what you're looking for, but sometimes I don't really know what I'm looking for, and/or what kind of modelling routes to explore! There is no substitute for hands-on experience.
Yes, thanks for all the clarifications. My results are looking good now :-)
I find the reference help is good if you know what you're looking for, but sometimes I don't really know what I'm looking for, and/or what kind of modelling routes to explore! There is no substitute for hands-on experience.