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.

Importing Geometry From XYZ Coordinates (Without Interpolationg or Without Filling Empty Areas)

Goksel Thermofluidics

Please login with a confirmed email address before reporting spam

Hello,

I have a Height Expressions that obtained from a 2-D problem solution and I'm trying to create a 3D Fluid surface whose one boundary is be determined by the Height Expression.

I export Height Expression (XYZ) data to "txt" or "excel sheet", then I import my data back to COMSOL via "Functions -> Interpolation". However, in this step (3D-> Geometry -> Parametric Surface ), COMSOL is creating the surfaces that are actually empty in the analysis and gives zero value. At this step surface is spoiled due to the interpolation (see attached file) near "virtually generated" surfaces and gives a significant error. (Please see attached files for difference and spoiled surfaces.)

Is there a way to convert Height Expression directly to a 3D surface or to accurately re-import the results? Many thanks, Goksel



5 Replies Last Post Apr 13, 2021, 5:41 p.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 12, 2021, 9:13 a.m. EDT

Hello Goksel,

Exporting the height expression and then importing it into another model may not be the best approach. One alternative to consider would be to use a deformed mesh interface, where the elevation of one of the faces of a 3D object would be driven by your 2D PDE.

But if you stick with the export-import approach, this thread should be helpful.

Best regards,

Jeff

-------------------
Jeff Hiller
Hello Goksel, Exporting the height expression and then importing it into another model may not be the best approach. One alternative to consider would be to use a deformed mesh interface, where the elevation of one of the faces of a 3D object would be driven by your 2D PDE. But if you stick with the export-import approach, [this thread](https://www.comsol.com/forum/thread/143132/importing-odd-shape-dem-and-xyz-available?last=2017-05-03%2016:33:44) should be helpful. Best regards, Jeff

Goksel Thermofluidics

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 12, 2021, 5:00 p.m. EDT

Hi Jeff,

First of all, thanks for your polite reply and advice. I don't have to stick with exporting and importing height expression to another model method. I would appreciate any faster and more precise alternative method.

Upon your recommendation, I reviewed the Deformed Mesh and Deformed Geometry features from Reference Manual. I guess Deformed Geometry fits my problem best since the excessive material will be removed from the control volume. However, I could not solve the 2D PDE that I have defined on only one surface of 3D geometry. Would you mind if you could suggest any topic in the Discussion Forum to help me understand deformed mesh interface. Thanks,

Best Regards, Goksel

Hi Jeff, First of all, thanks for your polite reply and advice. I don't have to stick with exporting and importing height expression to another model method. I would appreciate any faster and more precise alternative method. Upon your recommendation, I reviewed the Deformed Mesh and Deformed Geometry features from Reference Manual. I guess Deformed Geometry fits my problem best since the excessive material will be removed from the control volume. However, I could not solve the 2D PDE that I have defined on only one surface of 3D geometry. Would you mind if you could suggest any topic in the Discussion Forum to help me understand deformed mesh interface. Thanks, Best Regards, Goksel

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 12, 2021, 5:08 p.m. EDT

Hello Goksel,

To solve a coefficient form PDE on just one surface of a 3D object, you need to use the physics interface called Mathematics > PDE Interfaces > Lower Dimensions > Coefficient Form Boundary PDE. You'll then be able to specify on which boundaries you want that physics to apply.

Best,

Jeff

-------------------
Jeff Hiller
Hello Goksel, To solve a coefficient form PDE on just one surface of a 3D object, you need to use the physics interface called Mathematics > PDE Interfaces > Lower Dimensions > Coefficient Form Boundary PDE. You'll then be able to specify on which boundaries you want that physics to apply. Best, Jeff

Goksel Thermofluidics

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 13, 2021, 5:17 p.m. EDT

Dr Hiller,

"Coefficient From Boundary PDE" and "Deformed Geometry" with proper BCs solved my importing incorrect xyz data problem. Thank you again for your kind advices.

Would you mind if I ask for one last advice? Although I solved 2D PDE on only one surface, in 3D geometry many meshes deform at every step, that causing a significant amount of slowdown. Maybe I can speed it up a little more by applying coarser mesh to the area that I think will not be deformed. Other than that, is there any other feature of Comsol that might speed up the solution? Thanks a lot,

Best, Goksel

Dr Hiller, "Coefficient From Boundary PDE" and "Deformed Geometry" with proper BCs solved my importing incorrect xyz data problem. Thank you again for your kind advices. Would you mind if I ask for one last advice? Although I solved 2D PDE on only one surface, in 3D geometry many meshes deform at every step, that causing a significant amount of slowdown. Maybe I can speed it up a little more by applying coarser mesh to the area that I think will not be deformed. Other than that, is there any other feature of Comsol that might speed up the solution? Thanks a lot, Best, Goksel

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 13, 2021, 5:41 p.m. EDT

If the 2D equation is stationary and the 3D equation is transient, you could use two solution steps so as not to unnecessarily solve the 2D equation at every time step. It will not make a huge difference in solution time or memory usage, but it will decrease both a bit.

Best,

Jeff

-------------------
Jeff Hiller
If the 2D equation is stationary and the 3D equation is transient, you could use two solution steps so as not to unnecessarily solve the 2D equation at every time step. It will not make a huge difference in solution time or memory usage, but it will decrease both a bit. Best, Jeff

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.