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.

Nonhomogenous initial concentration

Trygvi Zachariassen Laksafoss

Please login with a confirmed email address before reporting spam

I want to model the development of biofilm in a perfusion culture. I model the cell culture chamber as a 2D transport of diluted species. I therefore want an initial concentration in the cell culture chamber to be random or non-homogenous. I have tried using the random function which is good but it fluctuates too much over small distances (too many peaks in small area). I alternatively tried to add a sinecurve multiplied by the initial concentration of cells, but with no avail. Is there a way to achieve non-homogenous initial condition which is smoother than what the random function can achieve? I know i can define spots around the cell chamber manually and apply an initial condition to these independently, but i shope for a better solution.

I have included an image of the initial cell concentration using the random function.



2 Replies Last Post 13.02.2019, 05:24 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 04.01.2019, 09:21 GMT-5
Updated: 6 years ago 04.01.2019, 11:53 GMT-5

Hello Trygvi,

You can indeed specify a spatially-varying function for your initial values, so when you said that "I alternatively tried to add a sinecurve multiplied by the initial concentration of cells, but with no avail.", can you clarify what you mean exactly? Specifically how did you try doing it (Exactly what expressions did you type, where did you type them, what arguments did they call, how were those arguments defined, etc), and in what sense was it to no avail (Did you get an error message? if so, what did it say exactly? etc) ? It would be best if you simply posted the .mph file in which you tried this, so other users can see for themselves the exact way you tried this and suggest a proper way to fix your file. If the file is too large to post on the Discussion Forum, clear the solution (and, if necessary, the mesh as well) to make the file smaller.

Best,

Jeff

-------------------
Jeff Hiller
Hello Trygvi, You can indeed specify a spatially-varying function for your initial values, so when you said that "I alternatively tried to add a sinecurve multiplied by the initial concentration of cells, but with no avail.", can you clarify what you mean exactly? Specifically how did you try doing it (Exactly what expressions did you type, where did you type them, what arguments did they call, how were those arguments defined, etc), and in what sense was it to no avail (Did you get an error message? if so, what did it say exactly? etc) ? It would be best if you simply posted the .mph file in which you tried this, so other users can see for themselves the exact way you tried this and suggest a proper way to fix your file. If the file is too large to post on the Discussion Forum, clear the solution (and, if necessary, the mesh as well) to make the file smaller. Best, Jeff

Trygvi Zachariassen Laksafoss

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 13.02.2019, 05:24 GMT-5

Hi Jeff

Thanks alot for your reply Jeff, and sorry for the long delay. For anyone looking this up later, i did find my issue. Because my model was i only a few mm scale, my sine-cosine wave was too large to give an impact on my initial concentrations. Increasing the frequency of the sine-cosine plane with around 10^3 fixed my problem. My initial condition thus ended up being Cx0+Cx0sin(1000x)cos(1000y), resulting in a good nonhomogenous initial condition. I have included an image for anyone looking this up in the future.

Hi Jeff Thanks alot for your reply Jeff, and sorry for the long delay. For anyone looking this up later, i did find my issue. Because my model was i only a few mm scale, my sine-cosine wave was too large to give an impact on my initial concentrations. Increasing the frequency of the sine-cosine plane with around 10^3 fixed my problem. My initial condition thus ended up being Cx0+Cx0*sin(1000x)*cos(1000y), resulting in a good nonhomogenous initial condition. I have included an image for anyone looking this up in the future.

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.