Comsol help write a boundary condition

AI Thread Summary
To create a boundary condition in COMSOL that depends on the gradient of a variable, users can utilize the "diff" function, which allows for differentiation, such as ux = diff(u,x). Familiarity with MATLAB syntax can ease the learning curve, as COMSOL's syntax is derived from it. Users are encouraged to explore the model library for examples and to save models as m-files to understand command syntax better. Additionally, COMSOL support can be contacted via email for assistance, and the online forum can provide helpful insights. It's noted that the gradient boundary condition type may vary depending on the application mode used.
Lusann Yang
Messages
1
Reaction score
0
Hi there,

I'm using comsol for the first time, and I think I've got everything working, except that I need to write a boundary condition that is dependent upon the gradient of a variable. How do I tell Comsol to take the gradient? I suppose I can define my own function, but I don't even know where to begin... (Man, comsol's support is not up to par. I don't think they even have a list of functions available anywhere.)

Thanks so much,
Lusann
 
Engineering news on Phys.org
Hi, you could use the "diff" internal function or then its shorthand, like ux is diff(u,x) and then it in the BC. Yeah, getting going with this software isn't quite as fast as with several others.
 
All the syntax for COMSOL is taken from Matlab, so if you are familiar with the latter the former is pretty comfy. You can also send e-mails to help@comsol.com (or something like this) and they will tell you how to do stuff. There is also a forum on their website you can search, i often find helpful stuff there. Finally, the model library is very useful! Just find a model that is similar to yours and look inside to see how they did it. You can even save the whole model as an m-file and read out the syntax of all the commands.

Actually, i think there is even a gradient boundary condition type depending on what your application mode is... Just define the variable in the appropriate variable table and then insert it in the space provided in the boundary condition tab.
 
diff (u,x) is not supported in v4. Any idea how to use it there?
 
How did you find PF?: Via Google search Hi, I have a vessel I 3D printed to investigate single bubble rise. The vessel has a 4 mm gap separated by acrylic panels. This is essentially my viewing chamber where I can record the bubble motion. The vessel is open to atmosphere. The bubble generation mechanism is composed of a syringe pump and glass capillary tube (Internal Diameter of 0.45 mm). I connect a 1/4” air line hose from the syringe to the capillary The bubble is formed at the tip...
Thread 'Physics of Stretch: What pressure does a band apply on a cylinder?'
Scenario 1 (figure 1) A continuous loop of elastic material is stretched around two metal bars. The top bar is attached to a load cell that reads force. The lower bar can be moved downwards to stretch the elastic material. The lower bar is moved downwards until the two bars are 1190mm apart, stretching the elastic material. The bars are 5mm thick, so the total internal loop length is 1200mm (1190mm + 5mm + 5mm). At this level of stretch, the load cell reads 45N tensile force. Key numbers...
I'd like to create a thread with links to 3-D Printer resources, including printers and software package suggestions. My motivations are selfish, as I have a 3-D printed project that I'm working on, and I'd like to buy a simple printer and use low cost software to make the first prototype. There are some previous threads about 3-D printing like this: https://www.physicsforums.com/threads/are-3d-printers-easy-to-use-yet.917489/ but none that address the overall topic (unless I've missed...
Back
Top