diff options
author | jaseg <git@jaseg.de> | 2023-10-20 18:24:45 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-10-20 18:24:45 +0200 |
commit | 31af2b260c660f53c3846056c466167b5177beb3 (patch) | |
tree | 950a562a654970edae4250f4a15d8af4415f5381 /twisted_coil_gen_twolayer.py | |
parent | dd49698df9f4313772130d02f189cd2fb275249f (diff) | |
download | gerbonara-31af2b260c660f53c3846056c466167b5177beb3.tar.gz gerbonara-31af2b260c660f53c3846056c466167b5177beb3.tar.bz2 gerbonara-31af2b260c660f53c3846056c466167b5177beb3.zip |
WIP
Diffstat (limited to 'twisted_coil_gen_twolayer.py')
-rw-r--r-- | twisted_coil_gen_twolayer.py | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/twisted_coil_gen_twolayer.py b/twisted_coil_gen_twolayer.py index 5f06c39..204e7aa 100644 --- a/twisted_coil_gen_twolayer.py +++ b/twisted_coil_gen_twolayer.py @@ -138,16 +138,19 @@ def traces_to_gmsh(traces, mesh_out, bbox, model_name='gerbonara_board', log=Tru trace_field = gmsh.model.mesh.field.add('BoundaryLayer') gmsh.model.mesh.field.setNumbers(trace_field, 'CurvesList', getCurves(*trace_tags.values())) gmsh.model.mesh.field.setNumber(trace_field, 'Size', 0.5) - gmsh.model.mesh.field.setNumber(trace_field, 'SizeFar', 10.0) + gmsh.model.mesh.field.setNumber(trace_field, 'SizeFar', 5.0) + #gmsh.model.mesh.field.setAsBackgroundMesh(trace_field) - substrate_field = gmsh.model.mesh.field.add('AttractorAnisoCurve') - gmsh.model.mesh.field.setNumbers(substrate_field, 'CurvesList', getCurves(substrate)) - gmsh.model.mesh.field.setNumber(substrate_field, 'DistMax', 10) - gmsh.model.mesh.field.setNumber(substrate_field, 'DistMin', 0) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMinNormal', board_thickness/3) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMaxNormal', 10.0) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMinTangent', 0.5) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMaxTangent', 10.0) + substrate_field = gmsh.model.mesh.field.add('Box') + gmsh.model.mesh.field.setNumber(substrate_field, 'VIn', board_thickness) + gmsh.model.mesh.field.setNumber(substrate_field, 'VOut', 10.0) + gmsh.model.mesh.field.setNumber(substrate_field, 'XMin', x1) + gmsh.model.mesh.field.setNumber(substrate_field, 'YMin', y1) + gmsh.model.mesh.field.setNumber(substrate_field, 'ZMin', -board_thickness) + gmsh.model.mesh.field.setNumber(substrate_field, 'XMax', x2) + gmsh.model.mesh.field.setNumber(substrate_field, 'YMax', y2) + gmsh.model.mesh.field.setNumber(substrate_field, 'ZMax', 0) + gmsh.model.mesh.field.setNumber(substrate_field, 'Thickness', 2*board_thickness) background_field = gmsh.model.mesh.field.add('MinAniso') gmsh.model.mesh.field.setNumbers(background_field, 'FieldsList', [trace_field, substrate_field]) @@ -339,17 +342,19 @@ def traces_to_gmsh_mag(traces, mesh_out, bbox, model_name='gerbonara_board', log trace_field = gmsh.model.mesh.field.add('BoundaryLayer') gmsh.model.mesh.field.setNumbers(trace_field, 'CurvesList', getCurves(toplevel_tag)) gmsh.model.mesh.field.setNumber(trace_field, 'Size', 0.5) - gmsh.model.mesh.field.setNumber(trace_field, 'SizeFar', 10.0) + gmsh.model.mesh.field.setNumber(trace_field, 'SizeFar', 5.0) #gmsh.model.mesh.field.setAsBackgroundMesh(trace_field) - substrate_field = gmsh.model.mesh.field.add('AttractorAnisoCurve') - gmsh.model.mesh.field.setNumbers(substrate_field, 'CurvesList', getCurves(substrate)) - gmsh.model.mesh.field.setNumber(substrate_field, 'DistMax', 10) - gmsh.model.mesh.field.setNumber(substrate_field, 'DistMin', 0) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMinNormal', board_thickness/3) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMaxNormal', 10.0) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMinTangent', 0.5) - gmsh.model.mesh.field.setNumber(substrate_field, 'SizeMaxTangent', 10.0) + substrate_field = gmsh.model.mesh.field.add('Box') + gmsh.model.mesh.field.setNumber(substrate_field, 'VIn', board_thickness) + gmsh.model.mesh.field.setNumber(substrate_field, 'VOut', 10.0) + gmsh.model.mesh.field.setNumber(substrate_field, 'XMin', x1) + gmsh.model.mesh.field.setNumber(substrate_field, 'YMin', y1) + gmsh.model.mesh.field.setNumber(substrate_field, 'ZMin', -board_thickness) + gmsh.model.mesh.field.setNumber(substrate_field, 'XMax', x2) + gmsh.model.mesh.field.setNumber(substrate_field, 'YMax', y2) + gmsh.model.mesh.field.setNumber(substrate_field, 'ZMax', 0) + gmsh.model.mesh.field.setNumber(substrate_field, 'Thickness', 2*board_thickness) background_field = gmsh.model.mesh.field.add('MinAniso') gmsh.model.mesh.field.setNumbers(background_field, 'FieldsList', [trace_field, substrate_field]) |