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.

Create a geometry and initial condition using data from a external file -Thanks

Please login with a confirmed email address before reporting spam

Hi, everyone,

I use the “heat transfer” mode to build my model (laser-material interaction), which includes phase change, temperature-dependent parameters, material removal and other physical mathematical effect (mode). When the material temperature is above a specific value (removal point), usually melting point or evaporation point, this part of material is removed, and the laser-material interaction interface changes correspondingly. Because I haven’t known how to track this interface using ALE method (I have tried and still continue trying after several failure), another way shown in the following procedure are applied(Loop method):
stop –> remove element –> create new geometry and initial value -> resolve continually

When the temperature is above the removal point, solve according to the following procedure:
1. Stop the solver (stop condition),
2. Copy the mesh element and the corresponding temperature,
3. Removal those mesh element whose temperature is bigger than removal point manually,
4. Create the new geometry using the modified mesh and corresponding temperature,
5. Solve again (continually).

Now I use the result (temperature distribution) at the first time step to change the geometry instead of using a stop condition “T > the removal point”, because the latter need so much steps to finish the whole solve (laborious and time-consuming) though it is more precise and approaches the actuality.

In the “result --> 2D plot --> surface“, I add a “filter” and use the expression “T<2000 (the so-called removal point)” to present the “logical expression for inclusion” to visualize the surface or the “changed geometry”. The “changed geometry” keeps the port of material whose temperature is below the removal point and ignore others (only invisible in the plot). This “changed geometry” (visible or invisible in the plot) is the “right new geometry” in the next time step, then I use the “add plot data to report” to extract the data and a text file (data 01.txt in the attachment) can be obtained. At first, because of large amounts of data I didn’t know what they mean. Accidentally and fortunately, I copy all data in the text file into a excel (data 01.xlsx or data 01.xls in the attachment) and found these data included Temperature (useful as initial value), Elements (triangles) (I didn’t the detailed use and function) and Coordinates (useful when create the new geometry). Furthermore, the quantity of data of the “elements” source is 49366 (sets), and each set includes three number. The other two (temperature and coordinates) is 25007 (sets) and each set includes one and two number, respectively. Is anyone who knows the actual meaning and function of the “Elements” in the exported file? Thanks in advance.

I have searched the forum and found some tips about the geometry create using matlab, after some endeavor, but fail to understand the details and create the new geometry. Could you give me some help? Thanks.
Another question is the initial temperature. From the data in the .txt or .xls file, the resultant temperature after the first time step (worked as an initial temperature in the next time step) is relative to the coordinate because both have same quantity. Could anyone have utilized the data from an external file as the initial condition and could you do me a favor to give me some guidance?

Thanks sincerely in advance for your suggestion and tips and look forward to your reply at your convenience.

ps. I'm not allowed to upload the .txt file, so there is only a .xlsx file instead. Sorry for that.

FM Huang
Nov. 7th, 2011




0 Replies Last Post Nov 8, 2011, 7:17 p.m. EST
COMSOL Moderator

Hello Huang Fumin

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.

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.