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.

take concentration profile at outlet and use it for inflow boundary condition

Please login with a confirmed email address before reporting spam

I have a laminar flow node and two transport of diluted species physics.

how do I take the concentration profile at the outlet from the first transport of dilute species (variable c) and use it as the inlet boundary condition for my second transport of dilute species (variable c2)?



11 Replies Last Post Apr 22, 2012, 1:47 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 2:03 a.m. EDT
when i add multiple stationary steps to the solver, all my solutions are the same (i.e. comsol computers subsequent solutions using the initial value rather than the solution from previous step)
when i add multiple stationary steps to the solver, all my solutions are the same (i.e. comsol computers subsequent solutions using the initial value rather than the solution from previous step)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 3:22 a.m. EDT
attached is the model i am testing it on, if it helps
attached is the model i am testing it on, if it helps


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 Apr 20, 2012, 11:50 a.m. EDT
Hi

this is the case by default, you must change the referencing in the "dependent variable" sub node of your solver tree

--
Good luck
Ivar
Hi this is the case by default, you must change the referencing in the "dependent variable" sub node of your solver tree -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 12:23 p.m. EDT

Hi

this is the case by default, you must change the referencing in the "dependent variable" sub node of your solver tree

--
Good luck
Ivar


Hi Ivar,

Thanks for replying,

Could you please clarify what you mean when you say "change the referencing in the "dependent variable" subnode"?
[QUOTE] Hi this is the case by default, you must change the referencing in the "dependent variable" sub node of your solver tree -- Good luck Ivar [/QUOTE] Hi Ivar, Thanks for replying, Could you please clarify what you mean when you say "change the referencing in the "dependent variable" subnode"?

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 Apr 20, 2012, 12:51 p.m. EDT
Hi

Open the Solver node structure and search for the node: "Dependent Variables"
Therein the initial conditions for each dependent variable can be set to default "0" or to a solution already existing.

COMSOl will only join them "automatically" (To use the results of the first as initial conditions for the second one etc) if you define severalsolvers under the same study i.e. a stationary + time dependent solver sequence within the same study

--
Good luck
Ivar
Hi Open the Solver node structure and search for the node: "Dependent Variables" Therein the initial conditions for each dependent variable can be set to default "0" or to a solution already existing. COMSOl will only join them "automatically" (To use the results of the first as initial conditions for the second one etc) if you define severalsolvers under the same study i.e. a stationary + time dependent solver sequence within the same study -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 1:10 p.m. EDT
Hi,

I believe that is what I did, but I would still get the same concentration profile across the length of the channel for both studies.

Does it have anything to do with the inlet concentration? I am setting the inflow of a boundary to a number (i.e. 1 mol/m^3). Should this be a variable? It seems to me when I run the second study using the previous solution, the inflow boundary would still initialize with 1 mol/m^3 as opposed to the concentration at the outflow boundary from the previous study.

Thanks,
Dan
Hi, I believe that is what I did, but I would still get the same concentration profile across the length of the channel for both studies. Does it have anything to do with the inlet concentration? I am setting the inflow of a boundary to a number (i.e. 1 mol/m^3). Should this be a variable? It seems to me when I run the second study using the previous solution, the inflow boundary would still initialize with 1 mol/m^3 as opposed to the concentration at the outflow boundary from the previous study. Thanks, Dan

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 1:14 p.m. EDT
If you can, could you please update the comsol file i attached so I can learn by example? I have been unable to find any other examples. I am trying to learn how to do this so I can use this method to solve more complex 3D geometries.
If you can, could you please update the comsol file i attached so I can learn by example? I have been unable to find any other examples. I am trying to learn how to do this so I can use this method to solve more complex 3D geometries.

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 Apr 20, 2012, 2:22 p.m. EDT
Hi

COMSOL distinguishes the initial conditions for variables solved for and the others, depending on how you set up your model and the multiphyiscs, perhaps you need to check both entries

--
Good luck
Ivar
Hi COMSOL distinguishes the initial conditions for variables solved for and the others, depending on how you set up your model and the multiphyiscs, perhaps you need to check both entries -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 20, 2012, 3:40 p.m. EDT
Hi

Thanks for all your help so far. However, I am still having the same problem. I apologize if I am causing you any frustration

the second dependent variable still does not seem to use the previous solution as initial conditions...

attached is the model I am trying to get it to work in. It would solve, but I have the same solutions for all my stationary steps, even though I set the dependent variables to use the previous solutions.
Hi Thanks for all your help so far. However, I am still having the same problem. I apologize if I am causing you any frustration the second dependent variable still does not seem to use the previous solution as initial conditions... attached is the model I am trying to get it to work in. It would solve, but I have the same solutions for all my stationary steps, even though I set the dependent variables to use the previous solutions.


Lechoslaw Krolikowski

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 22, 2012, 12:52 p.m. EDT
Hi,

My way to transfer outflow concentration profile to inflow - in the next run - is presented in the attached files.

Brief description of performed operations:
1. Outflow-to-inflow-1 model was created and run.
2. Outflow concentration profile was exported to an external file conc-out.csv.
3. Outflow-to-inflow-2 model was created.
4. conc-out.csv file was imported and stored as an interpolation function (int1).
5. int1 was imposed as the inflow boundary condition.
6. Outflow-to-inflow-2 model was run.

Maybe a simpler way exists. I don't know.

Best regards,
Andrzej
Hi, My way to transfer outflow concentration profile to inflow - in the next run - is presented in the attached files. Brief description of performed operations: 1. Outflow-to-inflow-1 model was created and run. 2. Outflow concentration profile was exported to an external file conc-out.csv. 3. Outflow-to-inflow-2 model was created. 4. conc-out.csv file was imported and stored as an interpolation function (int1). 5. int1 was imposed as the inflow boundary condition. 6. Outflow-to-inflow-2 model was run. Maybe a simpler way exists. I don't know. Best regards, Andrzej


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 22, 2012, 1:47 p.m. EDT
Hi everyone, thanks for replying.

@ Ivar, I tried using the periodic flow condition, but there wasn't really good documentation on how to use it.. Thanks for your help.

@ Andrzej, That is what I ended up doing, thanks!

I also tried using COMSOL with MATLAB, but kept getting errors, so i figured it would be easiest to just export interpolation data and use it for my next run.
Hi everyone, thanks for replying. @ Ivar, I tried using the periodic flow condition, but there wasn't really good documentation on how to use it.. Thanks for your help. @ Andrzej, That is what I ended up doing, thanks! I also tried using COMSOL with MATLAB, but kept getting errors, so i figured it would be easiest to just export interpolation data and use it for my next run.

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.