Hi,
For the Lagrange multiplier, have a look here doc/tutorials#22.
I don't have a deep knowledge of GetDP and the contact theory but, for the contact BC, I think the problem is not so simple.
Hi,
I think I found a working solution inspired by this answer.
The model is a hollow disk sector with centrifugal load.
One side (master) is fixed horizontally (uy=0). The second side (slave) is constrained with a Lagrange multiplier.
The necessary files are attached.
The resulting displacement value is confirmed by the analytical computations below.
Thanks for all the tutorials shared with the community: they are very useful and detailed. Among the Electrical machines tutorials, there is not a model which computes the magnet losses in time-domain simulations. Do you think it is possible to add this feature to one of the tutorials in the future release? If not, Since I've not many skills with GetDP, could you suggest which computation should be added?
Thanks
Hi,
I would like to create a constraint of the field A as shown in the figure. Every line is a physical region.
I defined a function for each constraint:
Function {
az_0[] = Vector[0, 0, -0.01838712666517017] ;
az_1[] = Vector[0, 0, -0.01837903738726093] ;
...
}
Then, I created a constraint for each line
Constraint {
{ Name az_0 ; Case { { Region Az_BoundaryLine_0 ; Value az_0[] ; } } }
{ Name az_1 ; Case { { Region Az_BoundaryLine_1 ; Value az_1[] ; } } }
{ Name az_2 ; Case { { Region Az_BoundaryLine_2 ; Value az_2[] ; } } }
...
}
where Az_BoundaryLine~{} is the region associated with the line.
I added the definition to the Functionspace:
Constraint {
{ NameOfCoef ae; EntityType EdgesOf ; NameOfConstraint a; }
For ii In {0:NumBoundaryPoints-1}
{ NameOfCoef ae; EntityType NodesOf ; NameOfConstraint az~{ii}; }
EndFor
}
I don't get any error from the solver, but it seems the constraints are not set when I display the A solution.
what is wrong with my procedure? I can share my files if needed.
PS: This is the solution I thought to set a field constraint defined by points. Please, tell me If you know any smarter solutions.
Thanks
Hi,
Is there any example which shows how to use Lagrange multipliers to set a constraint?
Thanks
Hi,
this is a great example! Could you share the commands to add the constraints?
Thanks
Hi Erik,
my original idea was to set A on the segments only. I will add many boundary lines so that they will approximate a continuous BC function (if it is possible).
I further simplified the model. Now, it is one empty circular sector only. Below, you can see the 2D solution with 5 nodes on the arc. For simplicity, I set integer Az values, in particular: 2, 1, 0, -1, -2. The model length is 1mm. In the 2D model, the Az unit is Wb/m. The solution is reported below. As you can see the flux density should be <= 30T in most of the volume.
In GetDP, I get the solution below. The solution is similar to 2D one but the field amplitude is different. I tried some rescaling factors for the Az values but this is the nearest one.
It would be nice to assign a function to the boundary as in 2D. I tried this approach but this method set the BC to the edges elements which are not parallel to z-axis. I think this is not a feasible solution.
I attached my scripts.
Thanks.
Hi,
I was able to assign a sinusoidal Az distribution along the boundary in 2D with the code below. However, if the function returns a vector and not a scalar I get the null solution.
Function {
...
// az_fun[] = 100*Vector[0,0,Cos[4*Atan2[Y[],X[]]]];
az_fun[] = 100*Cos[4*Atan2[Y[],X[]]];
}
Constraint {
{ Name MagneticVectorPotential_2D;
Case {
...
{ Region SurfaceGInf; Value az_fun[]; }
}
}
Hi,
I tried to further simplify my original rotor. Now it is an empty sector with 5 Az lines on the top surface.
I tried to put scalar values and vectors as Constraints but I get wrong results. Even if I understood the orientation problem and the coupling approach I don't know how to impose a Dirichlet BC as I want. I think it is a bit too hard to code for me.
So I was thinking to impose Q nodal currents representing the Q slots per pole. I prefer this solution because it does not require additional mesh. Is it possible to assign a current flowing through a line 3d? (In other words, I would use the lines I created for the Az BC for currents assignation so that they will create the equivalent excitation).
Thanks
Hi,
ok, the problem is clear.
I thought about a GetDP-style solution but I'm not sure it is feasible.
From 2D I extract the airgap field distribution (Az or H) at radius R and theta 0->180 el.deg (one pole).
I define a function that receives as input the xyz position (of the nodes?) and returns, by means of interpolation, the interpolated field vector. `myfunc[x,y,z] --> return --> Vi = Vector[Vxi, Vyi, Vzi]
I assign this function as a constraint to the airgap surface region
{ Region surf_gap; Type Assign; Value myfunc[XYZ[] on surface "surf_gap"] ; }
Thanks
Hi,
thank you very much, Erik.
Regarding your answer (1): I looked at the tutorial, I tried to simplify the scripts keeping the essential things only. I saw that a "cut" region is defined but it does not appear in the geometry. I think it is a dummy region to allow the current assignation. However, in my simple model if I don't assign the cut region to a physical entity I don't get any result. If I assign the front and rear conductor's faces to the Cut region I get a strange current density distribution. May I ask you to check my scripts? If I use this formulation, do you think I can set the H field at the airgap boundary (instead of Az) in my original model with magnets?
Thanks
Hi,
thank you for your detailed answer. From what you say, the H formulation seems to be more practical for a basic GetDP user like me. Hence, I think I'll do some tests with it.
{ Name phi0_perfect_insulation ;
Case {
{ Region Magnets_faces ; Value 0. ; }
}
}
and add such constrain to the function space?
FunctionSpace {
// scalar magnetic potential
{ Name Hgrad_phi ; Type Form0 ;
BasisFunction {
{ Name sn ; NameOfCoef phin ; Function BF_Node ;
Support Vol_Mag ; Entity NodesOf[ All ] ; }
}
Constraint {
{ NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint phi ; }
{ NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint phi0_perfect_insulation ; }
}
}
In the model shown in the figure, I modeled only a slice of the rotor. Since the front/rear faces touch the box phi=0, this would automatically set the perfect insulating condition?
This issue is strictly related to issue #135 (closed). In that case, the idea is to use the airgap Az distribution resulting from a 2D simulation as a boundary condition in the 3d model. I still don't know if it actually works but in that case, I would need to use the A-formulation which seems to be very hard for me from what you say. If I accept to use the circuital approach, do you think connecting each face with a current generator equal to 0 or with high resistance (e.g. 1e9ohm) with the ground would be a possible and valid alternative?
If I set only one magnet as conductive, would the eddy currents be automatically confined in the conductive region?
Is it possible to assign a current distribution to a cylindrical sheet without modeling an effective solid ring region? In that case, I would set the z-currents in the cylindrical airgap surface as I do in 2D with the "Point current" property (I use FEMM).
Thanks
Hi,
I would like to create a constraint of the field A as shown in the figure. Every line is a physical region.
I defined a function for each constraint:
Function {
az_0[] = Vector[0, 0, -0.01838712666517017] ;
az_1[] = Vector[0, 0, -0.01837903738726093] ;
...
}
Then, I created a constraint for each line
Constraint {
{ Name az_0 ; Case { { Region Az_BoundaryLine_0 ; Value az_0[] ; } } }
{ Name az_1 ; Case { { Region Az_BoundaryLine_1 ; Value az_1[] ; } } }
{ Name az_2 ; Case { { Region Az_BoundaryLine_2 ; Value az_2[] ; } } }
...
}
where Az_BoundaryLine~{} is the region associated with the line.
I added the definition to the Functionspace:
Constraint {
{ NameOfCoef ae; EntityType EdgesOf ; NameOfConstraint a; }
For ii In {0:NumBoundaryPoints-1}
{ NameOfCoef ae; EntityType NodesOf ; NameOfConstraint az~{ii}; }
EndFor
}
I don't get any error from the solver, but it seems the constraints are not set when I display the A solution.
what is wrong with my procedure? I can share my files if needed.
PS: This is the solution I thought to set a field constraint defined by points. Please, tell me If you know any smarter solutions.
Thanks
For 2D simulations is clear.
My last question was about 3D simulations and the following comment:
If you have a 3D model of a machine we can give it a try.
If you want to test 3D simulation results I could try it (In my free time).
Are you still interested to carry out this test? Thanks
It is a very good target! I could make a simple SPM model for your test. Which data do you need?
PS: I tried to run the SlidingSurface3D model but it gives the following error:
line 198: Unknown type of supplementary region: AlignedWith