Hello Christophe, there appear to be problems with my email formatting. To avoid that I re-send the previous message as a file (hopefully this should work)
Regards,
Marco
Il mercoledì 4 novembre 2020, 09:51:43 CET, Christophe Geuzaine
<[email protected]> ha scritto:
> On 21 Oct 2020, at 19:41, Marco Antolovic <[email protected]> wrote:
>
> Hi all,
>
> I'm experiencing a strange behavior with some variable after loading them
> from an external file using Merge.
>
> The attached files shows an example where the merged file (thermal_data.geo)
> contains three variables
>
> T0, rho_20 and alpha0
>
> When I run the script T0 and rho_20 are loaded without problems while alpha0
> is ignored and the following error is generated: 'prova.geo', line 8 :
> Unknown variable 'alpha0'
>
> Can someone explain what is happening?
The issue is linked to the mac encoding of the included file: Gmsh expects
script files with line ending with \n (or \r\n); mac encoded files end lines
only with \r.
Christophe
>
> Thanks,
>
> Marco
> <prova.geo><thermal_data.geo>_______________________________________________
> gmsh mailing list
> [email protected]
> http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://people.montefiore.ulg.ac.be/geuzaine
From my side I have spent some time thinking on how to solve, if possible, this
problem
with scripting tools only and I came out with the following idea
Assumptions:
1. The ID of the volume to be meshed with layered extrusion is known
2. The volume is extruded from a surface that belongs to a plane
3. Embedded curves are present only on top and bottom surfaces of the volume
4. The embedded curves on top does not match with embedded curves on bottom
I assume that if another entity is touching the volume (defined in points 1,2)
on its top and bottom surfaces, due to conformal meshing requirements, this
will
create embedded curves on them hence assumption 3 and 4.
The procedure is as follows:
- Select the volume that requires layered extrusion
- Duplicate its bottom surface (including embedded curves) and top embedded
curves
- Delete (recursive) the volume
- Duplicate, translate and embed the top embedded curves on the bottom surface
- Extrude the bottom mesh with Extrude{}{ Layers{...}}
- Embed the top curve on top surface generated by Extrude
- Run Coherence/BooleanFragmens
The attached script is a simplified version of the above procedure (the volume
requiring
extrusion is already deleted, top embedded curves, bottom surface and embedded
curves
already available).
I wanted to prepare a simple script and hopefully get a feedback before I embark
on further hours of scripting because there might be subtleties that only Gmsh
developers
are aware of which, if overlooked, could lead to a unicorn chase from my side
:-)
The script builds a cylinder inside a parallelepiped.
The cylinder is the volume meshed with a layered extrusion (along z) and it
features
two embedded curves, one on top and one on bottom that are different in shape
and location
on XY plane.
The mesh type in the parallelepiped is arbitrary, it only needs to guarantee
that
the total mesh (cube + cylinder) is conformal.
The results seem to give a conformal mesh and solve the extrusion problem.
Any feedback is much appreciated,
Many thanks,
Marco
structured_grids_with_step_files_test_V05.geo
Description: Binary data
_______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
