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:
1 decade ago
6 janv. 2012, 10:13 UTC−5
Hi
if you look at the physics, simple inlet and outlets are similar so you can also flow "out" of an inlet. But often its more than just a flow BC one need to adapt, i.e. a fixed temperature that changes etc, or you have laminar buildup regions with their own pressure drops and more parameters to adapt.
My way (if I do not use Matlab to command and define my full simulation) is to have two sets of BCs, and then I manually enable and disable them while I manually switch and run my solver in their respective sequence, while I link any new solver initial values to the last result of the previous one.
The manual way takes a little time, but if it's for a "once shot" its not that long. I nice Matlab script is cleaner but can take longer to set up.
One way to get there reasonably quick is to make your model in the GUI, clean it (File reset model) and save it as a .m file, then edit and adapt the .m file
--
Good luck
Ivar
Hi
if you look at the physics, simple inlet and outlets are similar so you can also flow "out" of an inlet. But often its more than just a flow BC one need to adapt, i.e. a fixed temperature that changes etc, or you have laminar buildup regions with their own pressure drops and more parameters to adapt.
My way (if I do not use Matlab to command and define my full simulation) is to have two sets of BCs, and then I manually enable and disable them while I manually switch and run my solver in their respective sequence, while I link any new solver initial values to the last result of the previous one.
The manual way takes a little time, but if it's for a "once shot" its not that long. I nice Matlab script is cleaner but can take longer to set up.
One way to get there reasonably quick is to make your model in the GUI, clean it (File reset model) and save it as a .m file, then edit and adapt the .m file
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
6 janv. 2012, 14:02 UTC−5
Hi Ivar,
Thank you so much.
I have one more doubt. I would like to know how to create a pulse input for a reactor.
Lets me explain my system now.
Consider a cylinder with the bottom of the cylinder coated with the catalyst. From the top of the cylinder i am
injecting the reactant (as a pulse) for every 10 seconds interval. For example my reactant inlet at the top of the cylinder will be opened from t=0 to t=2 second and it will be closed from t=3 to t=10 seconds. The inside part of the cylinder is just filled with the Nitrogen vapors. My reactant is in liquid state. It means that it is falling from the injection port to the bottom of the cylinder. Moreover the reactant is injected at a pressure of 12Mpa.
Now my question is how to incorporate the time dependent inlet condtion?
Thank you
S.A.Praveen
Hi Ivar,
Thank you so much.
I have one more doubt. I would like to know how to create a pulse input for a reactor.
Lets me explain my system now.
Consider a cylinder with the bottom of the cylinder coated with the catalyst. From the top of the cylinder i am
injecting the reactant (as a pulse) for every 10 seconds interval. For example my reactant inlet at the top of the cylinder will be opened from t=0 to t=2 second and it will be closed from t=3 to t=10 seconds. The inside part of the cylinder is just filled with the Nitrogen vapors. My reactant is in liquid state. It means that it is falling from the injection port to the bottom of the cylinder. Moreover the reactant is injected at a pressure of 12Mpa.
Now my question is how to incorporate the time dependent inlet condtion?
Thank you
S.A.Praveen
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:
1 decade ago
6 janv. 2012, 15:19 UTC−5
Hi
if it is really such a "clean" BC, you should be able to model that by defining a pulse train (Definitions - Function - waveform ... i.e "wav1()" pulse operator) and set your BC concetration to something like c = C0*wav1(t[1/s]) with the input conctration oscillating by this pulse train. But use a smoothed pulse, or pehaps even an almost sinus shape (at least to start with ,then make it gradually with steeper switch on/off) as these rapid transitions tend to give convergence errors.
Next you have to adapt the mesh and the time solver steps to your diffusivity, otherwise you will probably get numerical issues for the solver, or quite wrong flux results (if the time step is too short and the mesh too coarse).
Diff[m^2/s]*Dt < h^2 where Dt is the smallest time step, and "h" the average mesh size (h is a Comsol internal variable).
Infact I often plot the value "h^2/Diff" (or h^2/alpha in HT with alpha = k/rho/Cp the thermal diffusivity) on my initial conditions, this plot gives a view of the minimum time steps possible for a given mesh and the criticality in regions with steep concentration (or steep heat T) steps. Check your documentaton on HT or Diffusion.
I would even recommend to tra to set up a fine bounadary mesh along the input concentration boundary
Not to forget to set the time stepper of your time solver to "intermediate" (do not leave it "free" with periodic BCs) and ensure that you give time ranges such that you correctly resolve the turn-on and turn off with at least >3-5 steps per transition
Now it might be that I have not fully understood your problem, if its also with CFD/fluid physics, you add an extra leayer ofcomplexity as rapid turn on/off of fluids, particularly if its going turbulent require a careful meshing, and small time steps, hence a rather large workstation or perhaps even a cluster set-up.
If you can work in 2D-axi (perhaps to begin with) you will already strongly shorten the computing time. sounds like an interesting model you have there
--
Good luck
Ivar
Hi
if it is really such a "clean" BC, you should be able to model that by defining a pulse train (Definitions - Function - waveform ... i.e "wav1()" pulse operator) and set your BC concetration to something like c = C0*wav1(t[1/s]) with the input conctration oscillating by this pulse train. But use a smoothed pulse, or pehaps even an almost sinus shape (at least to start with ,then make it gradually with steeper switch on/off) as these rapid transitions tend to give convergence errors.
Next you have to adapt the mesh and the time solver steps to your diffusivity, otherwise you will probably get numerical issues for the solver, or quite wrong flux results (if the time step is too short and the mesh too coarse).
Diff[m^2/s]*Dt < h^2 where Dt is the smallest time step, and "h" the average mesh size (h is a Comsol internal variable).
Infact I often plot the value "h^2/Diff" (or h^2/alpha in HT with alpha = k/rho/Cp the thermal diffusivity) on my initial conditions, this plot gives a view of the minimum time steps possible for a given mesh and the criticality in regions with steep concentration (or steep heat T) steps. Check your documentaton on HT or Diffusion.
I would even recommend to tra to set up a fine bounadary mesh along the input concentration boundary
Not to forget to set the time stepper of your time solver to "intermediate" (do not leave it "free" with periodic BCs) and ensure that you give time ranges such that you correctly resolve the turn-on and turn off with at least >3-5 steps per transition
Now it might be that I have not fully understood your problem, if its also with CFD/fluid physics, you add an extra leayer ofcomplexity as rapid turn on/off of fluids, particularly if its going turbulent require a careful meshing, and small time steps, hence a rather large workstation or perhaps even a cluster set-up.
If you can work in 2D-axi (perhaps to begin with) you will already strongly shorten the computing time. sounds like an interesting model you have there
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
10 janv. 2012, 02:03 UTC−5
Hi Ivar,
Thank you so much for your reply.
I will get back to you again after trying that.
Thank you,
S.A.Praveen
Hi Ivar,
Thank you so much for your reply.
I will get back to you again after trying that.
Thank you,
S.A.Praveen