Recent versions of SOLIDWORKS have improved the predictability and usability of the dialogs FILE – SAVE AS, and FILE – PACK AND GO. Both of these, of course, allow you to move and copy files around while keeping the file references intact, and both are going to be LOTS better behaved than simply using the Windows File-Copy command. But what about those of us doing Finite-Element Analysis, or Computational Fluid Dynamics, in SOLIDWORKS? How do you move/copy parts and assemblies, while keeping them linked to their simulation results files? You can invest lots of time (human and machine) to get those results files, and you don’t want to have to re-compute them all over again, just because you moved the files to a different machine.
Don’t Move the Files?
Well, sure. That sounds like good advice. But there are several stark realities that intrude on this solution. First, locating your CAD files on some central file server, where they are a shared resource for all in your company, is a really good theory. But during the actual FEA or CFD solve, you have a very I/O bound process creating dozens or hundreds of really large files. If you want the solver to procede at the speed of RAM and local hard-drive access, then you should keep your FEA results files, (and scratch and journal files and all what-not), on your local hard-drive(s). Solving over the network can slow you job down by factors of at least 500. And you may have to keep harassing your IT person to keep opening up the default limits for open file handles, attendant sub-processes, etc. Nobody is happy with that.
If you then check your simulation results files into a Product Data Manager along with the CAD files, (yes, larger companies are starting to do that!), then you know that the next person who reviews those results, will be ‘checking them out’ into his own local working area, either within the PDM, or on his local hard-drive. So where you want to view them, is usually not the location in which they were cooked.
And in my case, I frequently run jobs on a machine we have customized for Analysis, our Sim Beast – but then I have to review those results files with customers, on my laptop. So, CAD files are going to move. Or at least, the Simulations results files are going to move, and we need to know how to re-connect them.
Windows File Copy For Finite Element Analysis (FEA) via SOLIDWORKS Simulation
Or also the Cut/Paste, mechanism in Windows Explorer, or using WinZip..; Basically any way of moving files that is NOT running a piece of SOLIDWORKS software – so the CAD system has been blind-sided by the change of locale. This is the most manual way to move the CAD data, because the files’ internal pointers to the Simulation results will NOT update when Windows moves them around, so your simulation results seem to go stale. But depending on whether you are doing an FEA simulation, or Flow simulation, they will react to these stale pointers in two different ways;
FEA results are stored in a file that has the name: ASSMBLYNAME-STUDYNAME.CWR. This can be stored in the same folder as the CAD files, or in a sub-folder you name, or can be directed to any other ‘scratch’ or working folder for FEA files. The path to this CWR file is stored in the header of the FEA study.
With a Windows-initiated File-Copy, the literal string in each Study header has remained unchanged, so no matter where you moved the CAD files TO, the study still is trying to locate results files where it originally came FROM. This can be very frustrating for the Simulation novice. If you create a string of several folders, each with copies of the CAD geometry, so that you can keep a bread-crumb trail of changes and the Simulation results for each change – each new CAD file copy is still going to ‘point’ back to the original source folder. Then after you try 5 or 6 variations, and the go back to variation #1 or #2 to compare… you find you’ve overwritten the original results every time, and you only really have the most recent study. (Does that sound familiar…?)
So, after you have copied the CAD files and the CWR files to a new folder, you have to open the top-level Assembly (or the Part) in a SOLIDWORKS session to re-connect them. Activate each study. Right-mouse-click over the study name, and select PROPERTIES. At the bottom of this dialog, it lists the path to the CWR results file – click BROWSE here and re-direct it to the new folder. Then you should be able to review the post-processing of the study, without needing a re-calculation, and without overwriting prior studies.
Windows File Copy For Computational Fluid Dynamics (CFD) via Flow Simulation
The linkage of CAD file to simulations results folder is quite different for CFD. In fact, the linkage is ancient – a throwback to the days before SOLIDWORKS Corp actually owned SRAC, the simulation company that wrote the integration. Each time you create a new Flow study, it initializes a new folder sequentially, named .1, .2, .3, etc. If there is already a study folder (from some completely other assembly’s flow study) named .4, then your next flow results folder will be .5. They don’t have to be perfectly sequential, the programmers did not really care about gaps in the sequence, they only cared about the uniqueness of the folder names, and this was the easiest way to create/name new ones.
The good news: If you copy a complete SOLIDWORKS assembly and/or part files, plus all the attendant .1, .2, .3, etc. sub-folders, to a new location – the next time you open SOLIDWORKS, the studies will simply ‘adopt’ the folders in the new location, because they are only looking for the literal folder name, in a location relative to the path of the current document. So re-connecting the Flow studies is easy.
This should scare you. It certainly worries me. How does the Flow study know that a folder, “.7” for example, is the ‘right’ .7 folder for this particular study, and not the 7th study for some other unrelated assembly’s study? And the hard answer is… It does not. You can overwrite studies and lose data quite easily with this scheme. So although re-connecting a Flow study after a move is trivial, you have another, much more critical responsibility: Never cross the streams. Keep all Flow Simulation studies each in their own separate folders, and away from each other. Period. Never try to ‘collate’ results by merging CAD folders to a common location, if those folders both contain Flow simulation results folders. This, of course, requires some planning ahead of time, and a disciplined approach, to avoid losing work.
There was an ongoing development for the 2014 version of SOLIDWORKS, that envisioned we would be able to re-name the results folders, thus preserving uniqueness, preventing over-writes, and allowing different flow studies to move around more freely. But, in the month or so before the final release of the 2014 version, this work was suspended. I am very, very hopeful that we will see this enhancement come to fruition in a future release – it is good to know, at least, that the programmers are working on it. Meanwhile – important safety tip – don’t cross the streams!
The more adventurous of you will also have discovered that a Flow study will create a StudyName.HTML file in the same folder as the CAD file, and this file contains the Study, Configuration name, and even the results folder names (as hyperlinks). How enticing! Seems like we could just edit this file and re-direct the links to new, unique folder names. Except, sadly, it does not work. The folder name is hard-coded in other places where we can’t get access, and you will only damage the study by trying to manually rename the results folder.
FILE – SAVE AS
Because the system of naming results folders are so very different between CFD and FEA, the behavior of the SAVE AS dialog also differs. If you have a part or assembly with FEA results, you will not actually see any fields in the SAVE dialog that acknowledge this. Don’t panic! Browse to the new folder location, assign the file name(s), and when you hit the final SAVE button, you will get the message below:
Say YES, and the new .CWR files will be created. They will contain the NEW name of the owning Cad file, as well as the specific study name, just as you would hope. No manual re-connection of the results files is required, so this is a lot better than using just a Windows Explorer file-copy.
If the same top-level CAD file contains one or more Flow studies, this prompt to also copy ‘result files’ will do nothing about them. Nothing. The SOLIDWORKS File-Save As dialog does not know about the Flow results folders. So either before or after moving /copying the CAD files, you will have to open Windows Explorer, and copy/paste the results folders to the new location. The good news, of course, is that the new CAD files will simply ‘adopt’ these flow results on-site, on sight. If you do not move/copy the .1, .2, .3 etc. folders, then the next time you mesh or run the study, it will re-create them in the new location.
FILE – PACK AND GO
This is my favorite way of moving copies of SOLIDWORKS files around – period. With or without Simulation results folders. Like the FILE-SAVE AS dialog, you can re-direct the CAD files, rename them at the same time, and preserve all the associative links. But unlike SAVE AS, this dialog has a specific check-box to allow you to dictate if the .CWR results files get copied, (and also possibly renamed) at the same time.
And even better news – if you have SOLIDWORKS 2015, then the ‘simulation results’ check-box will apply to both FEA and Flow results folders.
[In 2014 and before, this check box would ONLY resolve links to the FEA results (.CWR) files; it would do nothing about the Flow results (.1, .2, .3, …) folders. Again, the solution was to copy those folders to the target location manually, but also again, the Cad files will adopt them with no problems. ]
And there, you have it. Three different methods, two different kinds of Simulation results folder, so six possible outcomes – diverse enough, at first appearances, that I thought we should hash this out as a full KAP’s Corner article.
As always, I am on the lookout for new topics to write about next month, so please send your questions here, so that this forum can stay current on what issues are affecting SOLIDWORKS users these days.