Sven Friedel
                                                                                                                                                    COMSOL Employee
                                                         
                            
                                                                                                                                                
                         
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                3 févr. 2015, 03:11 UTC−5                            
                        
                        
                                                    Hi Daniel,
1) you can define under definitions a coordinate system of your choice, eg. a cylindrical one.
2) You can write out coordinate data e.g. (sys2.r,sys2.phi,sys2.z) just as you would write out any data.
3) data will by default be exported within the mesh points, so you will get additionally (x,y,z) out which I don't think yopu can suppress
4) if you need your data e.g. on a cylindrical grid, you may want to defrine those points r(i), phi(i), z(i) in a data file and chose the export option "points to evaluate in" --> "from file".
This should  bring you a step further to what you want to achieve - if not, let me know.
Sven                                                
                                                
                            Hi Daniel,
1) you can define under definitions a coordinate system of your choice, eg. a cylindrical one.
2) You can write out coordinate data e.g. (sys2.r,sys2.phi,sys2.z) just as you would write out any data.
3) data will by default be exported within the mesh points, so you will get additionally (x,y,z) out which I don't think yopu can suppress
4) if you need your data e.g. on a cylindrical grid, you may want to defrine those points r(i), phi(i), z(i) in a data file and chose the export option "points to evaluate in" --> "from file".
This should  bring you a step further to what you want to achieve - if not, let me know.
Sven                        
                                                
                                                                                                            
                                             
                        
                        
                                                
    
        Please login with a confirmed email address before reporting spam
     
    
 
                                                Posted:
                            
                                1 decade ago                            
                            
                                9 févr. 2015, 08:16 UTC−5                            
                        
                        
                                                    Hello,
Thank  you. Finally I used java to do the following:
- loop over a regular grid in my custom coordinate system
- using a 4x4 transformation matrix T (rotation+translation) I transform these points to the global CS
- write out the (x,y,z) coordinates of the points in the global CS into a file
- define this file as the set of points for evaluation, as you suggested in point 4)
- In order that the electric field (which is a vector quantity) be written out finally in my custom CS, I define 3 quantities to be exported: Rxx*Ex+Rxy*Ey+Rxz*Ez, Ryx*Ex+Ryy*Ey+Ryz*Ez, Rzx*Ex+Rzy*Ey+Rzz*Ez, where the R matrix is the rotational part (upper left 3x3 matrix) of the inverse of T
- The output file now contains the global (x,y,z) coordinates and the transformed E-field components, so I post-process this file and transform these global coordinates to the local ones using the inverse of the T matrix. I write out the transformed coordinates and the field components to my final fieldmap file.
This works.                                                 
                                                
                            Hello,
Thank  you. Finally I used java to do the following:
- loop over a regular grid in my custom coordinate system
- using a 4x4 transformation matrix T (rotation+translation) I transform these points to the global CS
- write out the (x,y,z) coordinates of the points in the global CS into a file
- define this file as the set of points for evaluation, as you suggested in point 4)
- In order that the electric field (which is a vector quantity) be written out finally in my custom CS, I define 3 quantities to be exported: Rxx*Ex+Rxy*Ey+Rxz*Ez, Ryx*Ex+Ryy*Ey+Ryz*Ez, Rzx*Ex+Rzy*Ey+Rzz*Ez, where the R matrix is the rotational part (upper left 3x3 matrix) of the inverse of T
- The output file now contains the global (x,y,z) coordinates and the transformed E-field components, so I post-process this file and transform these global coordinates to the local ones using the inverse of the T matrix. I write out the transformed coordinates and the field components to my final fieldmap file.
This works.