Difference between revisions of "PhParAdapt/Simmetrix"
(→Initial Notes to User) |
(→Creating Initial Restart and Error Files) |
||
Line 22: | Line 22: | ||
ln -s ../../geom_nat.x_t </nowiki> | ln -s ../../geom_nat.x_t </nowiki> | ||
− | Create an <code> adapt.inp </code> using the template [[#Adapt.inp_(non-adaptation_step) | Adapt.inp (non-adaptation step)]]. | + | Create an <code> adapt.inp </code> using the template [[#Adapt.inp_(non-adaptation_step) | Adapt.inp (non-adaptation step)]]. Keep <code>adaptFlag</code> set to zero as the purpose of running phParAdapt here is to create restart.<timeStepNumber>.1 file associated with a new mesh format that can be used for adaptation. |
+ | |||
+ | Run phParAdapt in this directory, which for this specific example was: | ||
+ | |||
+ | <code>mpirun -np 1 /projects/tools/Simmetrix.develop_19/phParAdapt-Sim/phParAdapt-Sim19/bin/x86_64_linux/phParAdapt-parasolid-openmpi</code> | ||
+ | |||
+ | |||
+ | After completion, the 1-procs_case and mesh_parts.sms directories should now be present. If a solution has already been generated for a different mesh on the same geometry, it can now be interpolated onto the new restart.<#>.1 file that was generated. If no solution exists, run Phasta using this restart file until the desired solution state has been achieved. Be sure to set <code>Print Error Indicators: True</code> in the solver.inp file so the error fields are saved in the final restart file. Before proceeding, check that the error fields exist using <code>grep -a " : <" restart.<#>.1</code> | ||
== File Examples == | == File Examples == |
Revision as of 12:33, 28 April 2021
The following page provides details for performing mesh adaptation using the PhParAdapt tool with Simmetrix routines.
Contents
Initial Notes to User
- The solution migration feature is currently broken and thus requires other means for transferring the solution to new meshes that are created from PhParAdapt (e.g. solution interpolation in Paraview)
- To date, the steps described herein have only been tried with the following restrictions:
- Tetrahedral elements
- Extruded element types apparently can be used but require removal of any extrusion constraints in the mesh. Below are some incomplete details regarding that process for reference. See Removal of Extrusion Constraint.
- Serial case
- Geometries created using SimModeler7.0-190626
- Adaptation using 6th entry of errors field
- Tetrahedral elements
Adaptation Process
Creating Initial Restart and Error Files
Beginning inside of the 1-1-Chef directory,
mkdir 1-1-phParAdapt cd 1-1-phParAdapt
Create soft links to the geom files above the 1-1-Chef directory,
ln -s ../../geom.smd ln -s ../../geom.sms ln -s ../../geom_nat.x_t
Create an adapt.inp
using the template Adapt.inp (non-adaptation step). Keep adaptFlag
set to zero as the purpose of running phParAdapt here is to create restart.<timeStepNumber>.1 file associated with a new mesh format that can be used for adaptation.
Run phParAdapt in this directory, which for this specific example was:
mpirun -np 1 /projects/tools/Simmetrix.develop_19/phParAdapt-Sim/phParAdapt-Sim19/bin/x86_64_linux/phParAdapt-parasolid-openmpi
After completion, the 1-procs_case and mesh_parts.sms directories should now be present. If a solution has already been generated for a different mesh on the same geometry, it can now be interpolated onto the new restart.<#>.1 file that was generated. If no solution exists, run Phasta using this restart file until the desired solution state has been achieved. Be sure to set Print Error Indicators: True
in the solver.inp file so the error fields are saved in the final restart file. Before proceeding, check that the error fields exist using grep -a " : <" restart.<#>.1
File Examples
The file examples below are what were used for this specific example and may contain parameter flags that may need to be changed or are not used at all.
Adapt.inp (non-adaptation step)
numberSolutionVars 6 numberErrorVars 10 refWeights 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 refThreshold 0.01 globalP 1 timeStepNumber 1 numelX 0 NSFTAG -1 ensa_dof 6 attributeFileName geom.smd meshFileName geom.sms modelFileName geom_nat.x_t Idirection 0 BYPASS 0 zScale 0 adaptFlag 0 errorName 0 SONFATH 0 lStart 0 rRead 6 rStart 0 AdaptStrategy 5 AdaptFactor 0.00001 AdaptOption 11 hmax 0.04 hmin 0.000052083 multipleRestarts 0 Periodic 0 prCD 0 timing 0 wGraph 0 phastaVersion 1.9.5 old_format 0 FortFormFlag 0 outputFormat binary CUBES 0 internalBCNodes 0 version UNKNOWN WRITEASC 0 phastaIO 1 numTotParts 1 SolutionMigration 0 DisplacementMigration 0 isReorder 0 isMCOPI 0 isBLAdapt 0 isThickAdapt 0 isSizeLimit 1 MaxLimitFact 2 MinLimitFact 2 rho 1.225 mu 1.7825e-5 dwalMigration 0 buildMapping 1
Adapt.inp (adaptation step)
eviscScal 0 pgrad 0 ub 1.45 lb 0.70 numSplit 5 sizeRatio 0.35 # confirmed that 0.25 does a 4x ref numSmooth 0 #confirmed that this gets used ratioThresh 0.75 # this is h_new/h_orig from isotropic days localAdapt 1 # makes setLocal force adaptivity only around nodes set size AnisoSimmetrix 4 # > 0 use Simmetrix, else ours 1 does largest length reduction by sizeRatio, 2 does both does medium and largest reduction by sizeRatio coarsenMode 0 # disables coarsening see coarsenMode docs for 1, and 2 numberSolutionVars 6 numberErrorVars 10 refWeights 1 1 1 1 1 1 1 1 1 1 refThreshold 0.01 globalP 1 timeStepNumber 1 numelX 0 NSFTAG -1 ensa_dof 6 attributeFileName geom.smd meshFileName geom.sms modelFileName geom_nat.x_t Idirection 0 BYPASS 0 zScale 0 adaptFlag 1 errorName 0 SONFATH 0 lStart 0 rRead 6 rStart 0 AdaptStrategy 5 AdaptFactor 0.5e-4 AdaptOption 11 hmax 1e6 hmin 1e-5 multipleRestarts 0 Periodic 0 prCD 0 timing 0 wGraph 0 phastaVersion 1.9.5 old_format 0 FortFormFlag 0 outputFormat binary CUBES 0 internalBCNodes 0 version UNKNOWN WRITEASC 0 phastaIO 0 numTotParts 1 SolutionMigration 1 DisplacementMigration 0 isReorder 0 isMCOPI 0 isBLAdapt 0 isThickAdapt 0 isSizeLimit 0 MaxLimitFact 2 MinLimitFact 2 rho 1.225 mu 1.7825e-5 dwalMigration 0 buildMapping 1
Notes on Folder Structure
Below is an overview of the folder structure to reference during the adaptation process:
- [ geom.smd, geom.sms, geom_nat.x_t ]
- 1-1-Chef
- 1-1-phParAdapt
- adapt.inp
- run_phParAdapt.sh
- 1-procs_case
- geombc.dat.1
- restart.<#>.1
- mesh_parts.sms
- A1-phParAdapt
- restart.<#>.1
- errors.<#>.1
- [geom.smd, geom.sms, geom_nat.x_t, parts.sms]
- adapt.inp
- <#> ( step number directory )
- mesh_parts.sms
- 1-1-phParAdapt
- [geom.smd, geom.sms, geom_nat.x_t]
- adapt.inp
- 1-procs_case ( restart files with adapted mesh )
- 1-1-phParAdapt
Removal of Extrusion Constraint
Riccardo has used a procedure in the past to remove the extrusion constraint from a mesh that enabled adaptation to be performed on extrusion-type elements.
The following directory contains an example of this process:
/projects/tools/Models/NASAWingBodyJunction/RajMeshFine/Mesh/1-1-phParAdapt/RemExtrusion/
The executable that is called for removal of the constraint is a part of SCOREC-core, found at <path/to/SCOREC-core/build/dir>/test/rm_extrusion
and the source code, in case edits are required, is found at <path/to/SCOREC-core/source/dir>/core/test/rm_extrusion.cc