Showing results for 
Search instead for 
Do you mean 
Reply

What's the best way to make a fem and sim template in NX thermal/flow?

Hello,

I have made a thermal/flow model of a lamp  (which consist out of 6 part files) which works perfectly and corresponds with real measurements. Now I have one part which has been changed and has an other filename. I want to use the same meshing-loads-boundary conditions-materials as in the first assy file. What is the fastest way to create a new fem and sim file? I am working currently in NX8.0.3. I know there are several methods but which method is the fastest?

 

BR

GVDP

10 REPLIES

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Dear GVDP,

Ufff... this is very complex to try to answer in a forum, it requires many, many lines .... I will try to do my best!!.

 

Create a templates directory
A template file functions like a seed part that you can use as a basis for creating, developing, or modeling an item.
To create a customized template file, you need to have access to a templates directory. Since you may not have access to the templates directory in the NX installation directories, you will build a local directory.
The default templates directory is located at UGII_BASE_DIR\ugii\templates. UGII_BASE_DIR is an environment variable that defines the base location of the NX installation.

  • Create a new directory on your desktop or in another location.
  • Name the directory templates.
  • Copy the entire contents of the UGII_BASE_DIR\ugii\templates directory to the new templates directory.

The new templates directory now contains many files. Most of these will not be used.

 

Create an environment variable
You need to create an environment variable to tell Advanced Simulation to use the new templates directory rather than the default directory.

  • Create an environment variable named UGII_TEMPLATE_DIR.
  • Set the variable value to the location of your new templates directory.

 

Create new templates files
The files delivered with NX reference many templates. You will copy some files to create new ones that will be edited to reference only your specific files.

The first file you need to copy is ugs_cae_templates.pax. This file controls a tab in the File > New dialog box. Copying this file will allow you to create a new tab:

  • In your new templates directory, copy ugs_cae_templates.pax and adv_fem_template.jpg.
  • Rename the copy ugs_cae_templates_custom.pax and adv_fem_template_custom.jpg.
  • Turn off the Read only property attribute for this file.

The next file to copy is the default FEM file template, for instance FemNxThermalFlowMetric.fem for NX Thermal/Flow models. You will modify this new FEM file to add in some default features so that you can avoid performing those steps with future models:

  • In your templates directory, copy FemNxThermalFlowMetric.fem.
  • Rename the copy FemNxThermalFlowMetri_custom.fem.
  • Turn off the Read only property attribute for this file.


Modify the .pax file
In this step you will modify the ugs_cae_templates_custom.pax file to create a new tab in the File > New dialog box.

The .pax file has a long list of entries. Each entry starts with a tag such as <PaletteEntry id="d1">, and ends with a </PaletteEntry> tag.

  1. Open the ugs_cae_templates_custom.pax file in a text editor.
  2. In the first <Presentation> element, change the FileNewTab= attribute value to "Custom".
    When you next run NX, a Custom tab appears on the File New dialog box.
  3. Delete all of the PaletteEntry tags except for the one labelled id="d2". This entry defines settings for the FemNxThermalFlowMetric.fem file.
    Your custom template will be based on this palette entry.
  4. Change the id= attribute value for the PaletteEntry element to " d1".
  5. Change the location= attribute value for the PreviewImage element to "adv_fem_template_custom.jpg".
  6. Change the content of the Filename element to FemNxThermalFlowMetric_custom.fem.
  7. Save and close the .pax file.

Your file should look like the one shown below. The areas that have been changed are shown in boldface type.

<?xml version="1.0" encoding="utf-8"?>
...
  <Presentation 
    name="Simulation templates" 
    bitmap="sheet_and_block.bmp" 
    FileNewTab="Custom" 
    application="All" 
    UserMasterModel="No"/>
    <PaletteEntry 
      id="d1">
    <References/>
    <Presentation 
      name="NX Flow" 
      description="Empty NX Flow Fem">
        <PreviewImage 
          type="UGPart" 
          location="adv_fem_template_custom.jpg"/>
    </Presentation>
    <ObjectData class="CaeFemTemplate">
      <Filename>
       FemNxThermalFlowMetric_custom.fem
      </Filename>
      <Units>
        Metric
      </Units>
    </ObjectData>
  </PaletteEntry>

</Palette>

The user interface changes are complete. In the next step you will set up the new FEM file template:

  • If NX is running, close NX with "File→ Exit"
  • Restart NX to load the new template settings.
  • Confirm that the Custom template tab has been added to the File New dialog box.
  • If the Custom tab does not appear, double-check that your UGII_TEMPLATE_DIR environment variable is correctly set, and that FileNewTab="Custom" is properly set in your .pax file.

Open the FEM file template
Use Open command and look in Templates. Browse to the templates directory that you created in the first step and load FemNxThermalFlowMetric_custom.fem:

  • Modify this FEM file by creating all mesh collectors required with assigned material and physical properties, and anything you like. Then you will store the FEM file for retrieval as a template.
  • File→ Close→ All Parts.

Using the template
Now that you have created the template, create a new FEM file using the template with "File > New >  Custom >  Templates".

 

You can follow the same procedure to create SIM templates, OK?.

Best regards,

Blas.

Blas Molero Hidalgo, Ingeniero Industrial, Director
IBERISA • 48004 BILBAO (SPAIN)
WEB: http://www.iberisa.com
Blog Femap-NX Nastran: http://iberisa.wordpress.com/

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Hi Blas,

 

Thanks for this detailed explanation. Will try to do so. Is there also another easy way rather than making a template? For example I have my first prt, i,fem and sim file and make a copy of this and give the 4 files a new name. After doing that going back to the assy prt file and replace old by the new part while keeping the other parts the same. In the idealized part file, it should normally also update as I applied a wave link to this part? and also for the fem and sim file. Is my reasoning correct?

 

BR

GVDP

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Dear GVDP,

You can try, but you know the internal dependencies between SIM, FEM and fem_i files, then forget the idea of "change the name", I better suggest to copy the full subdirectory to a new name and then to make changes there in the master model *.prt.

 

In the FEM environment you can issue the EDIT command and change both CAD parts & IDEALIZED parts, as well as select new bodies, this is the best way. Also with the EDIT command you can change the SOLVER ENVIRONMENT, this is very important as sometimes you can reutilice CFD models to perform structural analysis and viceversa.

 

Best regards,

Blas.

Blas Molero Hidalgo, Ingeniero Industrial, Director
IBERISA • 48004 BILBAO (SPAIN)
WEB: http://www.iberisa.com
Blog Femap-NX Nastran: http://iberisa.wordpress.com/

Re: What's the best way to make a fem and sim template in NX thermal/flow?

[ Edited ]

GVDP,

 

There are a number of ways to answer this. The one you want depends on how you created your model. Since you already did a Save As on your files, you have copies that you can use in tests. You also mention that you used wave links. I can think of 2 ways to try to update your model, and a 3rd way to create new models (i.e. Blas’ FEM/SIM templates suggestion). I often create FEM/SIM templates based upon existing models. It's not as hard as it sounds. In fact creating a new one takes me about 5 minutes.

 

My 1st suggestion is to replace the PRT data used to define the FEM. Open the FEM and select the FEM in the Simulation Navigator. Then select MB3 Replace Ideal/Master Part. This will let you select a new PRT file(s) to associate to the FEM. It will retain all data not associated to geometry, but since none of the geometry in the new PRT is in the FEM, all geometry association knowledge is lost. You will have to redefine meshes. Boundary conditions and loads will exist in the SIM, but you will have to reassign geometry to them. FE based meshes are retained and FE based boundary conditions and loads are retained.

 

My 2nd suggestion is to try to update the wave links in the idealized PRT. NX is able to update a CAE model to the extent that wave links can be updated. For example you can define a CAE model from a STEP file as input to a PRT. Then introduce a new STEP file in the process and update the CAE model. It requires updating the wave linked bodies in the idealized PRT and most likely using the Replacement Assistant feature when editing the wave links. The outline below defines the entire process related to STEP files or other foreign geometry sources. It sounds as though you have one advantage in that you are starting in NX. However you still have to update wave links. The outline is taken from a similar situation from a different user. You may be able to start from step 12 as you already have a CAE model defined.

 

  1. Start with a STEP file containing solid or sheet geometry
  2. Import the STEP into NX (create a new PRT or import it into an existing (but empty) PRT)
  3. Create a FEM
    1. Use the idealized part option
    2. Use the No Bodies option as you don’t want any geometry in the FEM yet

 

One would think that you would want the geometry from the PRT to go into the FEM. But you don’t want to do that just yet because you are going to use WAVE linking since you are anticipating geometry changes from the designer and a need to update your CAE model. If the CAE model is based upon the geometry before doing the WAVE link, then you won’t be able to update the CAE model from external geometry sources.

 

  1. Make the idealized PRT the work part
  2. Create WAVE links of the bodies to be used in the CAE model
  3. Hide the original component’s bodies or use the Replace Reference Set command on the original component and set it to NONE

 

Steps 4-6 create unique bodies in the idealized part and hide the bodies related to the original part. Now the display of the idealized part should be that of only the WAVE linked bodies.

 

  1. Switch to the FEM
  2. Edit the FEM (MB3 Edit in the Simulation Navigator after selecting the FEM)
  3. Select the bodies to use for the CAE model
  4. Mesh as needed
  5. Create a SIM and define loads, boundary conditions, solutions, and solve

 

Now the designer gives you a 2nd STEP file with updated geometry. There are multiple paths you can take here, but I will follow the path described in the presentation. It relies on editing the assembly structure of the idealized part. The idealized part is essentially an assembly that contains one instance (i.e. the master part). This approach will replace the master part instance used by the idealized part. Then it will update the WAVE linked bodies in the idealized part. Since those bodies are used in the CAE model, the CAE model will update its geometry.

 

  1. Create geometry in a new PRT from the STEP file (Open the STEP and save as a PRT, or import the STEP into an existing PRT)
  2. Make the idealized part the displayed part
  3. Go to the Assembly Navigator and select the master part then MB3 Replace Component
  4. Select the new PRT from step 12

 

That will break the WAVE link in idealized part’s history. The next steps will correct the WAVE link. First you have to show the assembly component related to the master part.

 

  1. Show the instance of the master part or change its reference set to Entire Part
  2. Go to the Part Navigator and edit the Wave link feature
  3. Select the body from updated assembly instance (i.e. the body from the 2nd PRT)
  4. Enter the Replacement Assistant dialog located in the Mapping section of the WAVE Geometry Linker dialog
  5. Set the Automatic Matching, Matching Algorithm to Geometric and select Find Geometric Matches

 

The automatic matching will match edges and faces from the new body with those that match the original body. Any meshes or boundary conditions defined on unchanged faces will update accordingly because automatic matching is telling the software that the edges/faces in the original body are now replaced by edges/faces in the new body.

 

  1. Manually define mappings with respect to edges and faces that are still present but may have been edited
  2. OK the dialogs
  3. Hide the assembly instance or set its reference set to Empty
  4. Switch to the FEM and update the mesh
  5. Switch to the SIM and update the loads and boundary conditions

 I reference the attached PPT in the outline above. It was created by Marilyn Tomlin, also a contributor to NX discussion groups.

 

Regards,

Mark

 

Mark Lamping

Simulation Product Management

Product Engineering Software

 

Siemens Industry Sector

Siemens Product Lifecycle Management Software Inc.

mark.lamping@siemens.com

www.siemens.com/plm

Re: What's the best way to make a fem and sim template in NX thermal/flow?

I was a victim of copy/paste restarting my numbered bullets each time a new paragraph begins. Sorry I didn't catch that before I posted the first reply. The intent is to have 25 steps in the outline, not several starting at 1.

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Hi Mark,

 

Thanks for this answer. As soon as I am back to office I will try your methods.

Your first suggestion: replace idealized part in the fem file. Does this also work in NX8.0.3?

You are referring to a powerpoint file. Can you share this in the group as it is not attached?

 

Best regards,

Gunther

Re: What's the best way to make a fem and sim template in NX thermal/flow?

[ Edited ]

Gunther,

 

I edited my original response to include the attachment as well. Thanks for pointing that out to me. Also, all of what I described above is supported in version 8.0.3. Most likely it is all supported from NX 6.0 onwards.

 

Regards,

Mark

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Hi Mark,

 

Thanks for this presentation. This is of course the fastest way if you just want to replace 1 part  in your assembly file without building everything from scratch again. This saves a lot of time. I am just wondering what will happen with the surrounding parts which are in contact with the replaced part during FEM update if you have applied automatic mesh mating conditions.For example the revised part could be in contact with an air volume (created by substract) in the idealized part after the wavelink.  The mesh of the revised part need to be coincident with the air volume mesh around it.I guess the substract will also update in the idealized part and hopefully also the fem file. I guess NX has solved this smartly... Will try it next week.

 

BR

Gunther

Re: What's the best way to make a fem and sim template in NX thermal/flow?

Gunther,

 

All operations downstream to the wave link depend on a successful wave link update (i.e. body, faces, edges). My guess is that a subtract operation would work well as the tools and targets are typically bodies. Operations that use faces and edges as inputs are more vulnerable to update failures as they can come/go and move around. Mesh mating conditions will try to update after geometry changes. It will be interesting to see how well your model responds to the changes you make.

 

Regards,

Mark