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.

give specific values for every mesh point of a boundary as boundary condition

Please login with a confirmed email address before reporting spam

hey everybody,

is it possibly to give different values for all points of the mesh on the boundary, respectively?

for example, just a vector containing as many values as i have boundary mesh points, or something including the coordinates/mesh point coefficients -- specifically, i want to use a solution of another study at one boundary as new boundary condition for another study, both at the same geometry+mesh. should be possible, no? (in fact, i want to use the old solution, but add to every value a time-dependent term, but this should work then as well.)

please let me know if you know anything helpful, thanks alot.

kind regards and all best,
sabine

16 Replies Last Post Feb 5, 2013, 3:04 p.m. EST
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 Jan 24, 2013, 10:14 a.m. EST
Hi

that is why you have the options under the solver for "Values and Dependent Variables"

check carefully the doc, and make a few simple examples how to use these

--
Good luck
Ivar
Hi that is why you have the options under the solver for "Values and Dependent Variables" check carefully the doc, and make a few simple examples how to use these -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 24, 2013, 10:41 a.m. EST
Dear Ivar, thank you for answering!
But i cannot find such an option, and "Values and dep..." does not appear in the user guide nor in the matlab link manuel either. I have only see
Solver Configurations-> Show Default Solver, Create Custom Solver, Clear Solutions, Delete Solvers, Dynamic Help
and Solver-> Compute, Compile Equations, Dependent Variables, Solver Settings(->...), Other(->...)
Sabine
Dear Ivar, thank you for answering! But i cannot find such an option, and "Values and dep..." does not appear in the user guide nor in the matlab link manuel either. I have only see Solver Configurations-> Show Default Solver, Create Custom Solver, Clear Solutions, Delete Solvers, Dynamic Help and Solver-> Compute, Compile Equations, Dependent Variables, Solver Settings(->...), Other(->...) Sabine

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 24, 2013, 10:58 a.m. EST
I believe Ivar refers to: study -> step 1 -> "values of dependent variables".

here step 1 is where you define the overall setting of the solver like "stationary", "time dependent", etc.... :)
I believe Ivar refers to: study -> step 1 -> "values of dependent variables". here step 1 is where you define the overall setting of the solver like "stationary", "time dependent", etc.... :)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 24, 2013, 11:16 a.m. EST
Hey Mattia, I appreciate your help a lot, but I still cannot find it !??
i already asked my office neighbour but she doesnt see it either.
Maybe you have another comsol version than I do?
if anyone sent me a snapshot of the screen, I could compare..
Hey Mattia, I appreciate your help a lot, but I still cannot find it !?? i already asked my office neighbour but she doesnt see it either. Maybe you have another comsol version than I do? if anyone sent me a snapshot of the screen, I could compare..

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 24, 2013, 1:51 p.m. EST
Hi,

I don't use the same Comsol version, so my answer is perhaps useless, but I have made almost the same thing you try to do.

What is the file format where you have your old solution for your boundary condition?

In my case, I have created a function (for example its name was "data") by importing a file (it was in .txt). After that, in my boundary condition I just write "data(x)" and it works.

Hope it will be usefull (or not...)

Cheers,

Laetitia.
Hi, I don't use the same Comsol version, so my answer is perhaps useless, but I have made almost the same thing you try to do. What is the file format where you have your old solution for your boundary condition? In my case, I have created a function (for example its name was "data") by importing a file (it was in .txt). After that, in my boundary condition I just write "data(x)" and it works. Hope it will be usefull (or not...) Cheers, Laetitia.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jan 24, 2013, 2:50 p.m. EST
Hi Laetitia,
that indeed sounds like a possible solution! I tried it for a while now, but need to do more user-guide-reading to be able to import my .txt-file (it tells me that something is wrong with the header etc) -- i think i could use 'interpolation function' rather than 'external function', I will see.
Thx already for the hint :)
sabine
Hi Laetitia, that indeed sounds like a possible solution! I tried it for a while now, but need to do more user-guide-reading to be able to import my .txt-file (it tells me that something is wrong with the header etc) -- i think i could use 'interpolation function' rather than 'external function', I will see. Thx already for the hint :) sabine

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 Jan 24, 2013, 3:17 p.m. EST
Hi

in the newer version, when importing a file to the interpolation function node, you can select use the spatial variables, and then your function maps onto your x,y,z (if all applies) of your geometry, provided that there is a correspondance of your geometry at the desired spatial position.

You can also, if you have several models in your file link the initial values of a later solver node to an earlier study case, check your solver tree nodes, in earler version it was only under the dependent variables node

--
Good luck
Ivar
Hi in the newer version, when importing a file to the interpolation function node, you can select use the spatial variables, and then your function maps onto your x,y,z (if all applies) of your geometry, provided that there is a correspondance of your geometry at the desired spatial position. You can also, if you have several models in your file link the initial values of a later solver node to an earlier study case, check your solver tree nodes, in earler version it was only under the dependent variables node -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 1, 2013, 2:03 p.m. EST
Hey,
so the way you suggested, Laetita, it works fine :) Thanks again!
Am I right to assume that the function used to interpolate the data is not relevant for this case, since I use the same geometry and mesh for the second case as for the one I save the data from, so that the only data used from the imported one is that at node points, where my interpolated function has the numerically obtained solution values themselfes?
Sabine
Hey, so the way you suggested, Laetita, it works fine :) Thanks again! Am I right to assume that the function used to interpolate the data is not relevant for this case, since I use the same geometry and mesh for the second case as for the one I save the data from, so that the only data used from the imported one is that at node points, where my interpolated function has the numerically obtained solution values themselfes? Sabine

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 4, 2013, 9:06 p.m. EST
Hi,
I have a similar problem, but probably more complex. I have a 3D image (just like a block) with a closed irregular hole in it. I can know the exact displacement of all these discrete mesh points sampled on the hole boundary. Now, how can I apply all the known displacements to the sampling points on the interior boundary (i.e., hole outline) ?
I have tried creating all the discrete points and then added their respective displacements as "Prescribed Displacement" (acting on the discrete points). But, I found that Comsol 4.3a didn't work at all because of "could not resolve domain relations". Is there other better way to do it ?
Thank you so much for help!!
Hi, I have a similar problem, but probably more complex. I have a 3D image (just like a block) with a closed irregular hole in it. I can know the exact displacement of all these discrete mesh points sampled on the hole boundary. Now, how can I apply all the known displacements to the sampling points on the interior boundary (i.e., hole outline) ? I have tried creating all the discrete points and then added their respective displacements as "Prescribed Displacement" (acting on the discrete points). But, I found that Comsol 4.3a didn't work at all because of "could not resolve domain relations". Is there other better way to do it ? Thank you so much for help!!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 11:01 a.m. EST
hi Jianyong,
cant you export a file with the mesh coordinates at the hole-material boundary, then write the displacements manually in the file (as to imitate a file created by exporting a solution done by comsol itself as worked in my case), make an interpolation function out of it and give it as dirichlet boundary condition?
if this doesnt work i dont have more ideas.
sabine
hi Jianyong, cant you export a file with the mesh coordinates at the hole-material boundary, then write the displacements manually in the file (as to imitate a file created by exporting a solution done by comsol itself as worked in my case), make an interpolation function out of it and give it as dirichlet boundary condition? if this doesnt work i dont have more ideas. sabine

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 11:54 a.m. EST
Hi Sabine,
I can export a file that includes the mesh coordinates at the hole-material boundary. Also, I can accordingly get the displacements on the mesh points on the boundary, by using other image processing software. I have written these diaplacements into the exported file. I am still wondering how to make an interpolation function out of it and give it as dirichlet boundary condition, because the interior hole boundary has an irregular shape and the displacement data are enssentially vectors, Can you provide more details on this aspect? Thank you so much for your help!
Hi Sabine, I can export a file that includes the mesh coordinates at the hole-material boundary. Also, I can accordingly get the displacements on the mesh points on the boundary, by using other image processing software. I have written these diaplacements into the exported file. I am still wondering how to make an interpolation function out of it and give it as dirichlet boundary condition, because the interior hole boundary has an irregular shape and the displacement data are enssentially vectors, Can you provide more details on this aspect? Thank you so much for your help!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 12:15 p.m. EST
Hi Sabine,
I am using "Structure Mechanics" Module of Comsol 4.3a. I can establish three Interploation functions, corresponding to three components of these displacements at the discrete mesh coordinates of the hole-material boundary with the use of "Mesh" Frame as the space corrdinates arguments by "Model<<Definiions<<Interploation". The following problem is how I can use these interploation functions as an input of boundary condition. In other word, how can I add a dirichlet boundary condition based on the established interploatoin ? Many thanks!!
Hi Sabine, I am using "Structure Mechanics" Module of Comsol 4.3a. I can establish three Interploation functions, corresponding to three components of these displacements at the discrete mesh coordinates of the hole-material boundary with the use of "Mesh" Frame as the space corrdinates arguments by "Model

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 12:25 p.m. EST
?
if my function was called 'myfunc' and depends on the coordinate r I would e.g. write:

model.physics('c2').feature('dir2').set('r', {'0'; '0'; 'myfunc(r)'});

and the same if you use comsol directly - or do i not see the point? in my model it stays orange though, so there is a problem with units, but i dont know how to resolve that and dont care at the moment
? if my function was called 'myfunc' and depends on the coordinate r I would e.g. write: model.physics('c2').feature('dir2').set('r', {'0'; '0'; 'myfunc(r)'}); and the same if you use comsol directly - or do i not see the point? in my model it stays orange though, so there is a problem with units, but i dont know how to resolve that and dont care at the moment

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 12:26 p.m. EST
of course also specify which boundary you mean etc but that is not different to a 'normal' boudnary condition
of course also specify which boundary you mean etc but that is not different to a 'normal' boudnary condition

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 2:00 p.m. EST
Hi Sabine,
What is the special dirichlet boundary condition as you said ? In the "Structure Mechanics" module, is this boundary condition the Prescribed displacement acting a single Point whose coordinates are specified in advance?
Hi Sabine, What is the special dirichlet boundary condition as you said ? In the "Structure Mechanics" module, is this boundary condition the Prescribed displacement acting a single Point whose coordinates are specified in advance?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 5, 2013, 3:04 p.m. EST
sorry, i dont know the structural mechanics module. just something that prescribes the value of the quantity whose value you now. maybe someone else can help if the manuals cant
sorry, i dont know the structural mechanics module. just something that prescribes the value of the quantity whose value you now. maybe someone else can help if the manuals cant

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.