Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Geometry variation within Time-Dependent solving.
Posted 18 apr 2011, 14:41 GMT-4 Computational Fluid Dynamics (CFD), Geometry, Parameters, Variables, & Functions, Studies & Solvers Version 4.0a, Version 4.1, Version 4.2, Version 4.2a, Version 4.3, Version 4.3a, Version 4.3b 25 Replies
Please login with a confirmed email address before reporting spam
I was wondering if it's possible to change geometry according to time ( via internal or external function(MatLab)) ?
ie: Making a block depth function of time.
Please login with a confirmed email address before reporting spam
Yes (and no), in V4 you have a few methods, either with dg physics (deformed geometry), or by setting up an equation in your geometry depending on "t".
Then I'm not sure (cannot check just now) but I suspect that the transient solver does not go through the full geometry section so it will probably not (pls check) update the geometry.
Normally, it's the external Parametric Sweep that loops through the geometry. So if a) the transient solver does not update the geometry, then you define a parameter "t" = 0[s], you call your Parametric sweep with the parameter "t" and you call the transient solver with only one time step "t"
Will it work ? I'm not sure, to be tested. The Parametric sweep will make the transient solver restart by default from initial "0" condition, this needs perhaps some tweaking.
Try it out, its slightly complex, would like to propose something simpler. For the deformed geometry , there is a few example in the model library if I remember right
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
(Currently on my 4.0a license) setting an internal (step) function of time and making it as a parameter for dimension don’t work . ? (It is still on my laser problem – moving a projected curve)
So I expect that an external function should not work either to parameterize the geometry... damn.
Ok, well I would like to try your suggestion. It sound tricky, but fun to try. Here a few things I miss up:
- What do you mean by ‘you call’ ? I interpret this as ‘you start’
- I can effectively set and use t as a parameter in the parametric sweep and make it sweep trought value range.
- How about the transient solver -> I make a single step ? How can we expect to make transient solving for several values (step)
-
(Sorry for theses ‘insignificant’ questions, I’ll try hard to do this without your ‘constant’ help)
Note that I can go with LiveLink (MatLab) too . I'll check out if there's a way to loop solving with the geometric part.
Please login with a confirmed email address before reporting spam
most functions wants unit-less calls for the variables, so use a x[1/m] or a t[1/s] in the function call and the orange colour will disappear. function results are scalar without units, so you might need to multiply it by an amplitude (even "1" with some units
As I said I'm not sure it works, to be tested.
What I understood is that you want to change your geometry for each time step. So if the transient solver does not update the geometry (that's what I remember) then you could try with a parametric sweep with a "t" as parameter and a range, then the transient solver runs for each "t" but only once. Is this better explained. (the time "range" of the transient solver is defined in the parametric sweep, because I'm sure that the parametric sweep will loop around the geometry)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Yes, now I see better what you mean.
I'll keep you in touch with the results of this problem.
Hope it'll keep precedent results.
Please login with a confirmed email address before reporting spam
one thing I forgot, Parameters for sweep should not have units, then perhaps you should try:
Parameter "tt", Parameter Sweep of "tt" range(0.1,0.1,1), transient solver time set: "tt" or "0 tt", as perhaps a transient solver wants two time, or a full time step, would have to check. to see the time variations you can also use a "tt*range(0.,0.1,1) to have 10 time steps per sweep iteration
The geometry will change but the time solver will restart at "0" as there is a new mesh each time.
The only other way is to use the "dg" that works perhaps directly with a time series, I haven't used it often so far...
And what I see from the doc (that I have at home) DG should work, it's like an ALE for the settings so you increase your side or geometrical shape in one direction with a variable depending on "t", then you do not need to play with the parametric sweep. But your mesh might become stretched, there is perhaps a remesh option, to be tested
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
So using parameter sweep with Transient solver don't work.
I'm now stepping into DG (I'm new to this too).
My problem have similarities to the one proposed by Navid Asadiznajani (Sliding blocks).
He used ALE.
In doc, we can read:
''The only real difference between the Deformed Geometry interface and the Moving Mesh interface is that the former defines a deformation of the material frame relative to the mesh frame, while the latter defines a displacement of the spatial frame relative to the material frame. ''
One thing I forgot: In my case, the moved geometry is a curve. There will be heat flux applyed to this closed curve.
I'll keep you in touch with this.
Please login with a confirmed email address before reporting spam
in doc, we can read
Limitations of the ALE Method (valid for Moving Mesh and Deformed Geometry interfaces)
' The connectivity of the mesh remains unchanged during the mesh deformation,
which means that topological changes in the geometry are not allowed. '
It is not what we are trying to do ?
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
I'm sure DG is "the" methode, I have added my simple test (v4.1.0.185)
--
Good luck
Ivar
Attachments:
Please login with a confirmed email address before reporting spam
Now have read both ALE and DG, I'm ready to modelise.
I'll keep you in touch.
Regards,
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
when the geoemtry interacts like that, you are in the "topology change" case, the numbering of boundaries and domains will change, hence the associations of material, physics and BC will have to be adapted over the respective changing domains/boundaries.
For me you need to split the solving sequence, and manually restart (after having corrected the associations) when you have overlapping boundaries
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Might this feature be an option in upcoming patches/releases?...where the transient solver loops back into the geometry and maps the previous time step solution to the current time step mesh as an initial condition?
Please login with a confirmed email address before reporting spam
that I believe you can mimic with the "re"mesher conditions. What is more tricky: if you topology changes, then the boundary and domain ID changes, but which physics follows which domain / boundary. That is far less easy to put in equation so that COMSOL can decide "by its own". So there I believe we will need a "human behind" still for several releases.
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I am trying to model the airflow of a Chinese hand-held fan. For that I am using the Laminar Flow equations in a transient simulation. I tested the model you sent but I don't think it solves my problem.
The specific problem that I find is that, at each time step, the solver doesn't take into account the movement from the last geometry to the current geometry. So for a hand fan inside air initially at rest, at each time step it simulates a (static) fan in the current position (which depends on time). There is no airflow.
Here is an example to make it clearer.
t=0s: the fan is straight (rotation angle = 0°) and the air is still
t=0.1s: the rotation angle is 5° and the air is still
t=0.2s: the rotation angle is 10° and the air is still.
The movement of the fan, which causes a local pressure difference and hence move the air around it, is not taken into account. Throughout the simulation the pressure is constant in the whole domain.
Do you have an idea how to model the movement (and the pressure difference) caused by the movement?
PS: that would also be applicable to flapping wings flight.
Please login with a confirmed email address before reporting spam
well from what you tell it sounds like you have not managed to couple the two physics. Try to repeat a few of the examples in the model library, then restudy your model you will probably then understand what you have missed
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I have almost the same problem but a bot different as first I computed a stationary parametric sweep for my fluid flow in the pipes as it does not change with time and then will use the results for my second study which is time dependent for the heat transfer. but apparently when i check the results from the second study, has not considered the parametric sweep from the first study.
Please login with a confirmed email address before reporting spam
I have almost the same problem but a bit different as first I computed a stationary parametric sweep for my fluid flow in the pipes as it does not change with time and then will use the results for my second study which is time dependent for the heat transfer. but apparently when i check the results from the second study, has not considered the parametric sweep from the first study.
Please login with a confirmed email address before reporting spam
When you have two solvers in sequences, you need to "store" the output of the first and get the second initials condition's node to read the stored results.
Often COMSOL takes care of htis, but if you have changed the solvers in any way from the COMSOL defaults, then COMSOL assumes you are taking care of lal changes, and you must manually check that this is done, by adding if requred a" store node" and setting the pointers of the node fields to the desired solutions data sets. (Or you clear the solvers, and your postprocesing, and generate a COMSOL default solver settings fresh again, then in general the links are set-up OK by COMSOL
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I do exactly the same as you mentioned. my first study is stationary and parametric sweep (velocity) only for the fluid flow and I store solutions and use the solutions as initial conditions for my second study which is transient and only for heat transfer but it looks like parametric sweep does not work.
I have also attached the mph file and would appreciate if you please comment on that.
thanks
ASAL
Please login with a confirmed email address before reporting spam
Hi Ivar,
I do exactly the same as you mentioned. my first study is stationary and parametric sweep (velocity) only for the fluid flow and I store solutions and use the solutions as initial conditions for my second study which is transient and only for heat transfer but it looks like parametric sweep does not work.
I have also attached the mph file and would appreciate if you please comment on that.
thanks
ASAL
Please login with a confirmed email address before reporting spam
first a few comments,
1) your HT fluid region you can select Velocity field "spf/fp1" instead of user defined, not that it should changee anything the way you have done it
2) your study 3 stationary, in the "Values of dependent variables" you shoul select it and refer to the first study, then you do not need to go into the details of all the dependent variables of study 3
3) as you ahve a parametric study in case 1, and just a time series, I do not beleive COMSOl proposes to do a mix, but will take only the first result from study 1, two ways around : 1) add a parametric for study 3 and hope COMSOl understands (I havent checked if this is truely the case, just a guess, 2) my preferrenec, set up one new study with the parametric sweep frist, then two stationary solver in sequence under the same "study", one after the other, the frist for the fluid, the second for HT. COMSOl will then make a "store solution to transfer the dependent variables not solved for from one to the next case
then generate the default solvers, you should get something like this (see image)
--
Good luck
Ivar
Attachments:
Please login with a confirmed email address before reporting spam
I have a problem of species transport in a porous medium and I want to change the crack aperture in function of time.
I tried the Ivar solution, with a parameter sweep : "tt" (for me, the crack aperture) and a variation of time in function of tt: range (10 * tt-1, 0.1,10 * tt) and tt range(0.1, 0.1, 1).
But Comsol uses the initial concentration value for each new set of time, new step for tt (in my case the concentration is zero).
I would like for each new tt, COMSOL use the concentration calculed during the previous tt step and do not reset the concentration in my medium.
How can I do that?
Or do you have another idea?
Thank you for your attention.
Erwan
Please login with a confirmed email address before reporting spam
I had a similar solute transport problem with yours. Have you figured out how to use the initial concentration from last step instead of reset to zero when using parametric sweep?
Or did you switched to another method?
Thanks,
Pin
Please login with a confirmed email address before reporting spam
I was just wondering if you have got solution to your questions. I want to calculate time weighted average concentration where I need to change the sample concentration during one time depending solution. In other words, one parameter will change over certain period time during one set of experiment.
It will be really useful if someone share the knowledge.
Thanks,
Nazmul
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
Suggested Content
- BLOG Introduction to Numerical Integration and Gauss Points
- KNOWLEDGE BASE Two-Phase Flow Modeling Guidelines
- KNOWLEDGE BASE Understanding the Fully Coupled vs. Segregated approach and Direct vs. Iterative Linear Solvers
- KNOWLEDGE BASE Resolving Time-Dependent Waves
- FORUM Geometry Addition With Time-Dependent Solving