Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all 141 articles
Browse latest View live

Deformed geometry : How to use the coordinates of a boundary in the deformed geometry as a variable?

$
0
0
Hi

In my model, I am using the Weak form PDE module and I require to use the at() operator for a source term.
For the first argument of the operator, I require the coordinates of one of the boundaries of my model, but it is deformed by a prescribed mesh velocity and is not stationary.
I could integrate the velocity over time and figure out the displacement, but I think there should be a straightforward way to get the displacement. Can someone shed any light on this?

(My model is 1D, so I'm using the at1 operator.)

Thanks
George

Applying Boundary Conditions Based on Deformed Geometry

$
0
0
Hello everyone,

Right now, I am trying to solve a coupled physics problem involving deformation and electric current. In essence, what I want to do is correlate electrical resistance between two spheres for varying applied loads. Based on previous work, we know that altering the applied force changes the spheres' contact area and, hence, the final electric resistance. TO implement this in COMSOL, however, there are a few issues I'm running into. Now, as you can imagine, there is an insulation boundary condition along the surface outside of the contact region. However, inside the contact region, current should be able to run freely between the spheres.

When trying to implement this insulation BC, there's a major issue in COMSOL. If I start with the undeformed geometry, then there is no contact region, and the entire surface is set as an insulation boundary. What I need to do is apply this boundary condition ONCE the deformation has taken place, but there is no way to do this at all. I have tried many suggestions before. Of those suggestions, one is to use the moving mesh (ALE) module to use the deformed geometry in the electric current module. Unfortunately, this does not work - since the entire surface is treated as insulated. Similarly, I also tried to export the deformed mesh into a new geometry via the "remesh deformed configuration" option. Again, this does not seem to work; the mesh is deformed inside the simulation, but the exported geometry is no different than the original geometry. The only difference is that the contact point is shifted vertically; the surface deformation is NOT exported. Is there any way that I could run the elasticity module and THEN apply this insulation boundary condition - such that current may run freely between the spheres? ANy suggestions are GREATLY APPRECIATED; this has been beyond frustrating....

Deformed geometry under concentration

$
0
0
I’m trying to solve a 2D coupled biological problem where the concentration of diluted species inside a body sunk in water is calculated by a diffusion problem (to simplify). The most important part of the model is that the concentration of the diluted species determines the area of the body. To simplify, [Area = x*Concentration + Initial area]. This means that somehow the body swells when concentration increases.
The body is an “infinite” layer stuck to a fixed boundary (wall), so there is only one free side. The transient concentration is spatially heterogeneous in the two dimensions. Because the concentration is local the growth/swelling of the body is anisotropic.
1- First, I tried to compute the moving boundary by using the mesh velocity tool (in Mathematics > Deformed mesh > Deformed geometry). I set the mesh velocity equal to the change in concentrations. I could obtain nice results but I think that this command only computes the deformation from the concentration measured in the boundary (interface body-water). I’m not sure about this. Maybe it accounts for the local deformation of all the nodes but I don’t think so.
2- Second and instead of following the steps in 1, I divided all the body in many smaller domains. I used surface integration (in Derived values) to estimate the mass in each sub-domain and I repeated the steps in 1 using these values. To capture the whole heterogeneity it is necessary to create sub-domains as small as the mesh elements.
3- Finally, I recalculated the concentrations both in 1 and 2 solving the conservative form of the transport equation by setting the convection term equal to mesh velocity.
Results using 1-3 and 2-3 are completely different. I don’t know which approach is best. Maybe any of them. Any advice is welcome. Thanks

PDE system and deformed geometry

$
0
0
Hello,

I have a very simple geometry: segment with a point in the middle. I pretend to simulate the diffusion process of three components by introducing the PDEs in a math interface. The PDE system solves the concentrations of two of the components (the third one must satisfy xA+xB+xC=1). The diffusion process also modifies the geometry. To compute that, I add a deformed geometry interface. I have two main questions:

- I define 0 flux in the edges. I define constant concentration of one of the components in one of the edge points (boundary). The Dirichlet boundary condition node I use to do that, allows me to define the condition for one of the variables or both variables. If I choose only one, the other one should satisfy 0 flux, but such node appears as overriden. Why the 0 flux cannot be defined independent to each variable too?

- Then, in that node I have an external flux for the variable that I want to keep constant. Such flux is used to define the displacement of the node. I define a velocity in the node. But then, I cannot define 0 displacement (fixed) in the middle point! However I can fix the point in the other edge. Why I cannot fix the middle point when one of the edges is moving? (both semi-segments are defined as free deformation)


Thank you

--
M. Sc. Oscar Banos

TU Dresden (Germany)

Problem with Automatic Remeshing / MUMPS allocation factor increased to 1.44.

$
0
0
Hi there,

I have built a COMSOL 2D model that uses deformed geometry, where the geometry movement is non uniform. I need to use Automatic Remeshing to update the mesh elements. But after some time (t = 0.29s) it fails.
I tried using moving mesh, mesh refinement as well as segregated solver, but I am unable to get rid of this error. I need to know why this error keeps popping up, and whether there is something that I am missing.
I have given the error, as well as the warning below, and also attached the wireframe and surface plots of the concentration before the error.

Any help would be appreciated.
Thanks.

Warning:
MUMPS allocation factor increased to 1.44.

Error:
The following feature has encountered a problem:
Nonlinear solver did not converge.
In Segregated Step 1
:
Time : 0.2924214449879353
Segregated Step 1
Singular_matrix

There_are x_void_equations_(empty_rows_in_matrix)_for_the_variable_x 14 comp1.cH_1p
at_coordinates (-1e-007,2e-007), (-1e-007,1.5e-007), (-1e-007,1e-007), (-1e-007,5e-008), (-1e-007,-3.08102e-020), ...
There_are x_void_equations_(empty_rows_in_matrix)_for_the_variable_x 14 comp1.cOH_1m
at_coordinates (-1e-007,2e-007), (-1e-007,1.5e-007), (-1e-007,1e-007), (-1e-007,5e-008), (-1e-007,-3.08102e-020), ...
There_are x_void_equations_(empty_rows_in_matrix)_for_the_variable_x 10 comp1.npe.Ceq_eqreac1
at_coordinates (-1e-007,2e-007), (-1e-007,1.5e-007), (-1e-007,1e-007), (-1e-007,5e-008), (-1e-007,-3.08102e-020), ...


Last time step is not converged.
- Feature: Automatic Remeshing 1 (sol1/t1/ar1)
- Feature: Time-Dependent Solver 1 (sol1/t1)

Cannot use Prescribed mesh velocity in Frequency-Transient Study

$
0
0
I'm setting up a microwave heating model with a deformed geometry.
The microwave field is solved in the frequency domain, and the other physics (e.g. heating) in the time domain. This is accomplished with the so called Frequency - Transient study, which works like a normal time dependent study, except that it allows to enter the frequency.
The additional 'physics' of the deformed mesh contains a prediscribed mesh velocity. It does what it should do in a time dpendent study. However when I combine it with the microwave using the above mentioned frequency-transient step, then I recieve the error:

Prescribed mesh velocity is only applicable for transient studies.
- Feature: Compile Equations: Frequency-Transient

But I do have a transient study, So? This seems unintended behaviour to me. Any suggestions ?

Food & Biobased Research
Wageningen University

Studies Loop with Comsol or Matlab?

$
0
0
Hello colleagues,

i want so simulate the material removal which includes two big different time scales.
My approach is to simulate in the first study the fast physical phenomena (electrical pulse + vibration, timescale is about 0.02 s) and in the second study a slower physical process (removal, timescale about 10s)

In my first study i simulate an electrical pulse and an oszillating cathode and from that i can compute an average removal speed at the anode within the very short time (0.02s)

Then i start my second study with a deformed geometry (displacement = average speed*time) and after e.g. 10s i have a new geometry as a result of the electrochemical machining.

And now my problem:
How to implement an automatic loop/sequence in Comsol which solves the problem (Studiy1-->Study2-->Study1 with new geometry --> Study2 --> Study 1--> and so on) for a defined number of steps?
Or is it only possible to do it with using of Matlab?

I hope somebody of you have experience in such multiscale/ multitime problems and can hap me.

Thanks and greetings
Ingo

Coupling solid mechanics with deformed geometry

$
0
0
Hello,

I am trying to create a 2D model where I have (for now) two shapes: a circle and a rectangular plate. Initially, the circle does not touch the plate. What I need it to do is to have the circle grow over time such that it eventually comes into contact with the plate and then causes it to deform.

So far, I've figured out how to make my circle grow over time using the Deformed Geometry interface (the guides and various online tutorials have been very helpful for this!) but I can't figure how to get it to cause the plate to deform? I'm assuming I need to set a contact pair between both shapes, but what BC do I need to use in the Solid Mechanics interface to have the deformation of the plate be dependent on the current size of the circle?

Thanks.

Can't export deformed geometry using electromechanics

$
0
0
Hi All,
I’m simulating the electrostatic force in 2D parallel plate capacitor, and there would be some expected deformation of the two electrodes.The four edges of the plates are fixed constraint. I included moving mesh and geometric nonlinearity in my model, the Moving Mesh is at the top of the physics list. However the deformed geometry I exported from the deformed configuration is the original geometry, not the deformed one. It seems there are some similar problems after 4.3, I would appreciate it if anyone could offer help. By the way in prescribed mesh displacement I could only set the inner boundaries between plates and air to be u and v, I couldn’t select the outside boundaries of the plates cause moving mesh could only be applied to the air inside.
Thanks in advance;)

3D plotting normal displacement on surfaces

$
0
0
When doing a 3-D plot, I want to illustrate how a c-library function I wrote, designed to generate rough surfaces via the Deformed Geometry (dg) module. I want to plot contours of the normal component of the displacement.

The displacement, defined over volumes, is : dg.dxx, dg.dyy, dg.dzz
The normal unit vector, defined (of course) over surfaces, is: dg.nXg, dg.nYg, dg.nZg

What's wanted is the dot product... but this requires sampling dg.dxx, etc, on the surface, where at present it is undefined.

Any hints?

Here's a plot of my surface, showing only dg.dxx, which is what I want only on faces normal to x-hat:
i.imgur.com/7EAVI4Z.png


Lagrange multiplier in axial symmetry

$
0
0
Hey Guys,

i am modelling a moving boundary interface (Stefan Problem), using the Lagrange multiplier T_lm from heat transfer analysis for prescribed normal mesh velocity in the deformed geometry physics.

The model is almost identical to the 2D Tin melting front example from Comsol library:
www.comsol.com/model/tin-melting-front-6234
except that I work in axial symmetry and my interface is perpendicular to the axis of symmetry.

When I solve, the Lagrange multiplier T_lm is always zero at r=0. I guess I am missing something fundamental here ? Does anyone have a hint for me ?

Thank you and Regards

--
______
Flanell

moving mesh stuck, deformed geometry fine?

$
0
0
Attached are two very, very similar (simple) 2D models of a disk that moves from left to right. One uses deformed geometry, while the other uses moving mesh. These two physics in principle should each be able to succeed, but in this case for some reason only the deformed mesh approach works!

I can only assume I've made a mistake somewhere in the moving mesh model, but these two are just so darn similar that I can't see where I went wrong. Anyone have any ideas?

Best,
Christian

Optimization error

$
0
0
Hi all,

I have to optimize the diameter of a heat transfer jacket. I have used deformed geometry node for this. Upon running the optimization, I am getting a message "Error in sweep". Where am I going wrong?

Best,
Mahvash

PS: I am using COMSOL 5.2

Shape optimization of radiating plate

$
0
0
Dear all,

I'm currently optimizing the shape of a vibrating plate in an closed hollow cylinder filled with air to get an as straight as possible wavefront. I model it 2D axisymmetric and make use of solid mechanics and pressure acoustics in the frequency domain.

My plate is drawn as an rectangle and I only want the top line of the rectangle to be optimized, however now my whole shape (top and bottom line) of the rectangle are changed equally. Which is logic because I set a prescribed mesh displacement in z direction, but I don't know how to do it another way. I tried an parametric curve, but then the geometry and mesh aren't updated.

What I did:
- Build my geometry, add material and configure the pressure acoustics and solid mechanics module correctly
** The geometry of the plate, which I try to optimize, is a rectangle created with 4 linear Bézier polygons.

- Next I defined an displacement of the plate in z direction as a variable.
** Name: dz, expression: q1*sc1*sin(2*pi*s). Here q1(defined later) is the optimization variable and sc1 (defined as global parameter) is a scaling factor (in this case sc1=2)

- I also defined an objective function, which I tested by changing some variables and shape by hand.

- Next I added the optimization module to my model. I added my objective function as global objective. For global control variables I defined q1 with an lower (-1) and upper bound(1) and an initial value of 0.

- After that I added Deformed Geometry to my model. I selected all the solid mechanics. I added "Free deformation" to the part I want to optimize. To the boundaries of the part that I want to optimize I added "Prescribed mesh displacement" with dz as prescribed mesh displacement in z direction.

- At last I added a frequency domain study where I disabled the stationary solver and added an optimization solver.

Can someone explain me how to optimize only the top line of the rectangle and keep the bottom and sides fixed?

Thanks in advance.

Greetings Nick

PS the attachment is an overview of the geometry and the materials.

Laminar flow problem does not converge for most boundary conditions

$
0
0

HI,

I have set up a 3D laminar flow problem in a rectangular geometry with an inlet and outlet. The problem presents in reality a fluid exchange problem: a box of fluid is connected to a pump, which introduces another species of fluid from the inlet while the fluid in the box is expelled through the outlet.

I tried a variety of boundary conditions for the inlet and outlet but only few of them result in a converging simulation. Ideally, I would like both inlet and outlet to have laminar inflow/outflow=1e-6 m^3/s; however, this condition does not give a converged solution. I know from your forum that specifying both inlet and outlet boundaries to be velocity/flow rate may cause problems to convergence, so I also tried specifying velocity/inflow at the inlet and a constant pressure at the outlet. However, this works only if pressure=0Pa, which is far from ideal for my system.

Can someone suggest any reason that possibly causes the convergence problem, and what would be the solutions?

Thanks.


Novice Question - Partitioning Domains in 2-D

$
0
0

Hello all,

I'm working on a Comsol design of a device through which fluid will flow. I used SolidWorks to design the device, and imported the relevant face as a .DXF to obtain the 2-dimensional cross section that I want to model flow through. The overall design is thus: Design

I'd like to keep this domain: Domain to be kept

And subtract these domains: Domains to be subtracted

I've used the "partition domains" function to identify/highlight the relevant portions, but I seem to be unable to use the "difference" tool to delete the domains I want gone. I need to use the edges of the to-be-subtracted domains as walls, and the vertical lines connecting the innermost rings as the outlets.

Any help is greatly appreciated, please let me know if more clarification is needed.

Broken Automatic Geometry Update

$
0
0

Hello, I am using parametric geometric optimization with acoustics and therefore the model needs to be updated in every optimization pass. In 2D everything works fine, but in 3D, when the Optimization Solver changes parameters, the geometry is not updated, even though the button "Automatic rebuild" is activated. I need to mention that I'm using interpolation functions and parametric curves utilizing those functions to describe certain shapes. Is there a specific reason why this is not working in 3D (v5.3a)?

Thanks in advance!

Sweep forms a grid

$
0
0

Hi,

I am new to Comsol and know very little about different features of the software. When I want to form a grid by sweeping, the software prompts for an unsupported link surface topology. what should I do? thank you.

3D plotting of 2D axial symmetry without an expression

$
0
0

I only want to get the 3D plot of my model without any expression to include the picture in my paper. I've chosen different colors for different parts of my model but these colors aren't visible when I plot it with a variable expression. How can I see the 3d model?

Fully Developed Flow

$
0
0

I want to create a pipe which has fully developed flow through in it. Unfortunately, I am very new in comsol and I cannot find that fully developed choice in the program. Also I am not sure that there is that fully developed fluid flow choice in the program but I hope that. Please inform me about my problem

Viewing all 141 articles
Browse latest View live