Skip to content
Snippets Groups Projects
Commit 5213047b authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

Adding various new mesh prototypes

For visualization check emails with Christoph Geuzaine.
Also, Coherence; and Mesh.Algorithm = 5; are two very powerful options.
parent 1d60e9a8
No related branches found
No related tags found
No related merge requests found
SetFactory("OpenCASCADE");
Mesh.Algorithm = 5; // Necessary to avoid problems with small lc at VIn
Disk(1) = {0, 0, 0, 4};
Field[5] = Ball;
Field[5].Radius = 0.5;
Field[5].VIn = 0.01;
Field[5].VOut = 0.05;
Background Field = 5;
\ No newline at end of file
SetFactory("OpenCASCADE");
Mesh.Algorithm = 5; // Necessary to avoid problems with small lc
Disk(1) = {0, 0, 0, 4};
Physical Surface("surfacedomain") = {1};
Field[3] = MathEval;
Field[3].F = ".35 - (.335)*exp(-(1./0.05) *((sqrt(x*x+y*y+z*z)-0.8))*((sqrt(x*x+y*y+z*z)-0.8)))";
Field[4] = MathEval;
Field[4].F = ".35 - (.335)*exp(-(1./0.05) *((sqrt(x*x+y*y+z*z)-1.1))*((sqrt(x*x+y*y+z*z)-1.1)))";
Field[5] = Min;
Field[5].FieldsList={3,4};
Background Field = 5;
\ No newline at end of file
SetFactory("OpenCASCADE");
Disk(1) = {0, 0, 0, 4};
Physical Surface("surfacedomain") = {1};
Field[3] = MathEval;
Field[3].F = ".5 - (.5-0.01)*exp(-(1./0.1) *((sqrt(x*x+y*y)-1))*((sqrt(x*x+y*y)-1)))";
Mesh.Algorithm = 5; // This is necessary to avoid irregularities of Gaussian
Background Field = 3;
// NOT TESTED, POTENTIAL ISSUES
SetFactory("OpenCASCADE");
Sphere(1) = {0, 0, 0, 0.8, -Pi/2, Pi/2, 2*Pi};
Sphere(2) = {0, 0, 0, 1., -Pi/2, Pi/2, 2*Pi};
Sphere(3) = {0, 0, 0, 2, -Pi/2, Pi/2, 2*Pi};
BooleanDifference(4) = { Volume{2}; Delete; }{ Volume{1};};
lcar1 = .35;
lcar2 = .15;
lcar3 = .01;
Physical Surface("surfacedomain") = {3};
Physical Volume("volumedomain") = {3};
Characteristic Length{ PointsOf{ Volume{4}; } } = lcar3;
Characteristic Length{ PointsOf{ Volume{1}; } } = lcar2;
Characteristic Length{ PointsOf{ Volume{3}; } } = lcar1;
Coherence;
\ No newline at end of file
// NOT TESTED, POTENTIAL ISSUES
SetFactory("OpenCASCADE");
Sphere(1) = {0, 0, 0, 0.8, -Pi/2, Pi/2, 2*Pi};
Sphere(2) = {0, 0, 0, 0.95, -Pi/2, Pi/2, 2*Pi};
Sphere(3) = {0, 0, 0, 1.05, -Pi/2, Pi/2, 2*Pi};
Sphere(4) = {0, 0, 0, 2, -Pi/2, Pi/2, 2*Pi};
lcar1 = .45;
lcar2 = .35;
lcar3 = .04;
Physical Surface("surfacedomain") = {4};
//+
Physical Volume("volumedomain") = {1,2,3,4};
//+
Characteristic Length{ PointsOf{ Volume{1}; } } = lcar1;
Characteristic Length{ PointsOf{ Volume{2}; } } = lcar3;
Characteristic Length{ PointsOf{ Volume{3}; } } = lcar3;
Characteristic Length{ PointsOf{ Volume{4}; } } = lcar1;
Coherence; //Necessary to connect all volumes/make mesh coherent
\ No newline at end of file
SetFactory("OpenCASCADE");
Sphere(1) = {0, 0, 0, 4, -Pi/2, Pi/2, 2*Pi};
Physical Surface("surfacedomain") = {1};
Physical Volume("volumedomain") = {1};
Field[3] = MathEval;
Field[3].F = "1.0 - (1.0-0.0025)*exp(-(1./0.4) *((sqrt(x*x+y*y+z*z)-0.15))*((sqrt(x*x+y*y+z*z)-0.15)))";
Background Field = 3;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment