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.

Random function independent of mesh

Please login with a confirmed email address before reporting spam

I'm running a time-dependent simulation using the general form PDE interface. I have to assign random numbers for my initial condition. Since the random number generator in COMSOL takes the spatial coordinates as input, the distribution of the initial condition is very mesh sensitive. Is there anyway that I can make the initial condition mesh independent? I was thinking about generating a uniform distribution of random numbers independent of mesh and then some how do the interpolation and find nodal values corresponding with that distribution. Is this possible? How?

2 Replies Last Post 22.01.2017, 12:05 GMT-5
COMSOL Moderator

Hello Youness Alvandi

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 7 years ago 20.01.2017, 00:07 GMT-5
Hi Younes,

please let me know if you find a way.

thanks,

Shayan
Hi Younes, please let me know if you find a way. thanks, Shayan

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 22.01.2017, 12:05 GMT-5
Yes, I made a reference model with a fine mesh and random initial condition, ran it and exported the distribution of the parameter I am interested in at time zero. And then used an interpolation function to import this distribution as an initial condition for my other models with coarser mesh.

Yes, I made a reference model with a fine mesh and random initial condition, ran it and exported the distribution of the parameter I am interested in at time zero. And then used an interpolation function to import this distribution as an initial condition for my other models with coarser mesh.

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.