Difference between revisions of "Exporting Parasolid from SolidWorks"
(60 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
− | Save out your Model as a parasolid from SolidWorks. | + | Save out your Model as a parasolid from [[SolidWorks]]. Note that you will want the geometry as close to ready for meshing as possible, as performing model "surgery" in SimModeler is not always straight forward. The outputted file from SolidWorks will have the format <code><file_name>.x_t</code>. |
+ | |||
+ | If you do not have a parasolid model of your own, you may use the On Ramp example file located at: | ||
+ | |||
+ | /projects/tutorials/OnRamp/example_geom.x_t | ||
+ | |||
+ | Ensure that you are on one of the viznodes and not portal1. You may tunnel to viz003 by opening a terminal and running: | ||
+ | |||
+ | vglconnect -s viz003 | ||
+ | |||
+ | Navigate to and copy your file into your working directory. Typically, we create a folder where all the simulation files are stored. For example, after opening a terminal I could run the commands: | ||
+ | |||
+ | mkdir Demo | ||
+ | cd Demo | ||
+ | |||
+ | This would place me in my working directory 'Demo'. To copy all the files for the On Ramp demo, run this in your 'Demo' directory: | ||
+ | |||
+ | cp /projects/tutorials/OnRamp/* . | ||
+ | |||
+ | Next, you'll want to change the parasolid file extension from <code>.x_t</code> to <code>.xmt_txt</code>. To do this, run <code>mv <file_name>.x_t <file_name>.xmt_txt</code> from your terminal. From here, you are ready for the ''convert'' step. The convert step is documented here: https://fluid.colorado.edu/tutorials/tutorialVideos/Convert2Sim_Tutorial.mp4 | ||
+ | |||
+ | |||
+ | '''Summary of video:''' | ||
+ | 1. Ensure <code>convertParasolid2Sim.sh</code> and <code><file name>.xmt_txt</code> are in your working directory. | ||
+ | |||
+ | 2. Set environment with soft adds found in <code>more ~kjansen/soft-core.sh</code> | ||
+ | |||
+ | 3. Run <code>./convertParasolid2sim.sh <file name>.xmt_txt</code> in your terminal | ||
+ | |||
+ | 4. Convert step is complete and your directory now contains 3 new files: <code>model.smd</code> <code>relations.log</code> & <code>translated-model.smd</code>. The <code>translated-model.smd</code> file is the one we need moving forward in this tutorial. | ||
+ | |||
+ | |||
+ | Once the convert step is complete, you are ready to move onto the next step and use [[Getting Started with Simmodeler| SimModeler]] to create a mesh for the new <code>translated-model.smd</code> file we created! | ||
+ | |||
+ | == Geometries with Standalone Surfaces == | ||
+ | |||
+ | There are sometimes cases where models will contain not only three dimensional solid bodies but also surfaces. Surfaces are treated differently by Solidworks and parasolid files than solid bodies, so they need to be exported separately. In order to do this, you select all entities except the surface and save as a parasolid, after you hit save, Solidworks will ask if you want to save all of the geometry or only the selected geometry, the second option being the one we want. Now do the same but only select the surface. In newer versions of Simmodler, only the domain needs to be run though the conversion and the surfaces can be added as parasolid files. In older versions, these two separate parasolid files needed to be converted to <code>.smd</code> separately (remember to rename files after they are converted to avoid overwriting) and recombined in Simmodeler. The toolchain seems to fail for multiple unconnected surfaces, so if this is the case, take care to export them separately. | ||
+ | |||
+ | To recombine, simply open the solid body file in Simmodeler, under the "Modeling" tab select "Add Parts", add the surfaces file, then select "Make New Manifold Model" which will combine the files into one model that is suitable for PHASTA. |
Latest revision as of 08:06, 11 April 2024
Save out your Model as a parasolid from SolidWorks. Note that you will want the geometry as close to ready for meshing as possible, as performing model "surgery" in SimModeler is not always straight forward. The outputted file from SolidWorks will have the format <file_name>.x_t
.
If you do not have a parasolid model of your own, you may use the On Ramp example file located at:
/projects/tutorials/OnRamp/example_geom.x_t
Ensure that you are on one of the viznodes and not portal1. You may tunnel to viz003 by opening a terminal and running:
vglconnect -s viz003
Navigate to and copy your file into your working directory. Typically, we create a folder where all the simulation files are stored. For example, after opening a terminal I could run the commands:
mkdir Demo cd Demo
This would place me in my working directory 'Demo'. To copy all the files for the On Ramp demo, run this in your 'Demo' directory:
cp /projects/tutorials/OnRamp/* .
Next, you'll want to change the parasolid file extension from .x_t
to .xmt_txt
. To do this, run mv <file_name>.x_t <file_name>.xmt_txt
from your terminal. From here, you are ready for the convert step. The convert step is documented here: https://fluid.colorado.edu/tutorials/tutorialVideos/Convert2Sim_Tutorial.mp4
Summary of video:
1. EnsureconvertParasolid2Sim.sh
and<file name>.xmt_txt
are in your working directory.
2. Set environment with soft adds found in more ~kjansen/soft-core.sh
3. Run ./convertParasolid2sim.sh <file name>.xmt_txt
in your terminal
4. Convert step is complete and your directory now contains 3 new files:model.smd
relations.log
&translated-model.smd
. Thetranslated-model.smd
file is the one we need moving forward in this tutorial.
Once the convert step is complete, you are ready to move onto the next step and use SimModeler to create a mesh for the new translated-model.smd
file we created!
Geometries with Standalone Surfaces
There are sometimes cases where models will contain not only three dimensional solid bodies but also surfaces. Surfaces are treated differently by Solidworks and parasolid files than solid bodies, so they need to be exported separately. In order to do this, you select all entities except the surface and save as a parasolid, after you hit save, Solidworks will ask if you want to save all of the geometry or only the selected geometry, the second option being the one we want. Now do the same but only select the surface. In newer versions of Simmodler, only the domain needs to be run though the conversion and the surfaces can be added as parasolid files. In older versions, these two separate parasolid files needed to be converted to .smd
separately (remember to rename files after they are converted to avoid overwriting) and recombined in Simmodeler. The toolchain seems to fail for multiple unconnected surfaces, so if this is the case, take care to export them separately.
To recombine, simply open the solid body file in Simmodeler, under the "Modeling" tab select "Add Parts", add the surfaces file, then select "Make New Manifold Model" which will combine the files into one model that is suitable for PHASTA.