Jeff Hiller
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                4 years ago                            
                            
                                22 sept. 2021, 09:54 UTC−4                            
                        
                        Updated:
                            
                                4 years ago                            
                            
                                22 sept. 2021, 17:00 UTC−4                            
                        
                        
                                                    Hello Aron,
If I understand correctly, you would like to automate the creation of geometry, based on some data that is contained in a table. There are two basic approaches you can employ:
1. If you have MATLAB and your COMSOL license includes LiveLink for MATLAB, you could use that interface. See the two manuals for that product for more details. They are accessed through File > Help > Documentation.
2. If not, you can use Java scripting instead, see for instance this blog for an example, or this video for more details.
Best,
Jeff
    -------------------
    Jeff Hiller                                                
 
                                                
                            Hello Aron,
If I understand correctly, you would like to automate the creation of geometry, based on some data that is contained in a table. There are two basic approaches you can employ:
1. If you have MATLAB and your COMSOL license includes [LiveLink for MATLAB](https://www.comsol.com/livelink-for-matlab), you could use that interface. See the two manuals for that product for more details. They are accessed through File > Help > Documentation.
2. If not, you can use Java scripting instead, see for instance [this blog](https://www.comsol.com/blogs/how-to-create-a-randomized-geometry-using-model-methods/) for an example, or [this video](https://www.comsol.com/video/automating-your-modeling-workflow-with-model-methods-in-comsol) for more details.
Best,
Jeff                        
                                                
                                                                                                            
                                             
                                            
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                4 years ago                            
                            
                                23 sept. 2021, 03:13 UTC−4                            
                        
                        
                                                    I dont actually want to automate it.
I just want to know how to import a deviation survey (as x,y,z table) and turn it into a well (a pipe like structure).
                                                 
                                                
                            I dont actually want to automate it. 
I just want to know how to import a deviation survey (as x,y,z table) and turn it into a well (a pipe like structure). 
                        
                                                
                                                                                                            
                                             
                        
                        
                            
                                                                                        
                                Jeff Hiller
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                4 years ago                            
                            
                                23 sept. 2021, 09:28 UTC−4                            
                        
                        Updated:
                            
                                4 years ago                            
                            
                                23 sept. 2021, 17:16 UTC−4                            
                        
                        
                                                    Hi Aron,
While there are ways of reading plain-text file data into COMSOL, there is no one-step way of bringing in a deviation survey and turning it into the sort of geometry feature you are hoping to generate I am afraid. Either of the two approaches I suggested earlier remain valid alternatives. With that said, there is one more idea that came to my mind and it may well be simpler for you to implement: if you can massage your data so that instead of being a list of depth, inclination and azimuth it is a list of (x,y,z) coordinates -which should be a matter of simple trigonometry- then you could import that directly into a Polygon. In the attached screenshot, I typed such coordinates manually into a table but another option is to read those coordinates from a file.
I hope this helps.
Jeff
    -------------------
    Jeff Hiller                                                
 
                                                
                            Hi Aron,
While there are ways of reading plain-text file data into COMSOL, there is no one-step way of bringing in a deviation survey and turning it into the sort of geometry feature you are hoping to generate I am afraid. Either of the two approaches I suggested earlier remain valid alternatives. With that said, there is one more idea that came to my mind and it may well be simpler for you to implement: if you can massage your data so that instead of being a list of depth, inclination and azimuth it is a list of (x,y,z) coordinates -which should be a matter of simple trigonometry- then you could import that directly into a Polygon. In the attached screenshot, I typed such coordinates manually into a table but another option is to read those coordinates from a file.
I hope this helps.
Jeff