CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF Moving Boundary Mesh Problem

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By RaiderDoctor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2017, 10:54
Default UDF Moving Boundary Mesh Problem
  #1
New Member
 
Join Date: Jun 2017
Posts: 3
Rep Power: 8
Nick8529 is on a distinguished road
Hi,

I am new to CFD and this forum. I am trying to use Fluent to simulate a hydrualic cylinder for a university project but I am having problems with the mesh.

I am using a define_CG_motion udf which which I can get to move the piston how I want but when I preview the mesh motion it will run through a few time steps but then says negative cell volume detects. I have searched this forum for an answer but cant find anything that works.

I have tried using smoothing, layering and remeshing and a combination of them but nothin works. When I watch the mesh motion the psiton will move and some cells compress but then when the cells get too small it fails. I thought that with the layering that when a cell got to a certain size it would collpase and with remeshing, it would remesh to adjust with the movement but this doesn't seem to happen.

Thanks for any help,

Nick
Nick8529 is offline   Reply With Quote

Old   June 3, 2017, 12:06
Default
  #2
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
First off, welcome to the forum and nice job successfully coding your UDF. A lot of people find trouble with that, myself included. Now, on to your specific problem.

Long in the short, yes remeshing is supposed to take care of a lot of the deformations within the fluid domain to allow for calculation to continue. What is important to understand, however, is that it is not a cure all. If your moving wall physically comes into contact with another surface, if it moves too quickly, or if it compresses the domain too much, that will lead to negative cell volume. Think of it this way; when a wall is compressing the fluid domain, the cells respond by getting smaller and smaller. If the wall completely compresses the domain, there is no place for the cells to go, and no way that they can be infinitesimally small enough to deal with physical contact between the two walls. Of course, this is why you get a negative cell volume. To combat this, a lot of people create relief areas in the setup that function as a solid surface when it comes in contact with the moving wall. That way, the integrity of the solution is maintained, and the cells are not completely crushed.

A relief area (not even sure if it's called that) is just basically a predefined space that will function as part of the fluid domain until it comes in contact with a moving wall. At that point, it functions as a solid and does not allow fluid flow.

Your case is a little bit different, however, as you are modeling a piston within a cylinder and, by the very nature of the device, the piston head has to almost completely compress the fluid domain. Although I'm sure you have, try checking out these videos (https://www.youtube.com/watch?v=aTIwmEyp3_8&t=187s, and https://www.youtube.com/watch?v=JsBc6_qqITk), as they are very close to your case. While you never explicitly mentioned it, I'm assuming you are using tetrahedral elements in your cylinder and trying to compress it, which is leading to your negative cell volume. Try switching to hexahedral cells, and use the layering technique (which is outlined in the video).

I think the layering technique will be more beneficial to you, as opposed to the smoothing method. This is because while the smoothing method seeks to adjust the position of each node in the mesh, the layering technique will phsyically remove and add layers adjacent to the moving boundary based on the constant height of the layers within the domain. Try reading through this section in the manual to get a better understanding (https://www.sharcnet.ca/Software/Flu...ic-layer-split).

Let me know if this helps. Also, if it's not too much trouble, would you mind posting your code and a picture of your setup? I'm sure a lot of people would find it helpful.
arikan likes this.
RaiderDoctor is offline   Reply With Quote

Old   June 4, 2017, 16:51
Default
  #3
New Member
 
Join Date: Jun 2017
Posts: 3
Rep Power: 8
Nick8529 is on a distinguished road
Hi,

Thanks for your reply.

It was difficult getting the UDF movement working in fluent but eventually got there thanks to some posts on this forum. I think I probable have taken on too much as I dont have much of a clue what I have been doing.

I have used both the tetrahedral and hexahedral meshes and while neither of them can get me the full stroke of the piston, the tetrahedral one always gets further, the hexahedral one fails almost instantly.

I'm not sure how I can add photo but I have just been trying to get the idea working before I get it on the full model so its relatively straight forward setup at the moment, just a cylinder with another smaller cylinder outlet coming out the side

I have tried the layering technique exactly as he does in that video and its working a little better but it still doesnt get very far before failing so I dont think the relief area will be of any use.



Posted that too soon. I've just got it working not sure how, I will have to work out what I have done differently. Thanks for your help

Last edited by Nick8529; June 4, 2017 at 17:07. Reason: Posted too early
Nick8529 is offline   Reply With Quote

Old   August 31, 2017, 20:04
Default
  #4
New Member
 
Join Date: Aug 2017
Posts: 3
Rep Power: 8
wandapop is on a distinguished road
Quote:
Originally Posted by Nick8529 View Post
Hi,

I am new to CFD and this forum. I am trying to use Fluent to simulate a hydrualic cylinder for a university project but I am having problems with the mesh.

I am using a define_CG_motion udf which which I can get to move the piston how I want but when I preview the mesh motion it will run through a few time steps but then says negative cell volume detects. I have searched this forum for an answer but cant find anything that works.

I have tried using smoothing, layering and remeshing and a combination of them but nothin works. When I watch the mesh motion the psiton will move and some cells compress but then when the cells get too small it fails. I thought that with the layering that when a cell got to a certain size it would collpase and with remeshing, it would remesh to adjust with the movement but this doesn't seem to happen.

Thanks for any help,

Nick
Hi,

I am new to CFD in general but have however been doing research such that i am comfortable with the workbench and all its element.as with Nick8529 i am trying to use Fluent to simulate a cylinder with a moving wall(piston) for a university project. in short, i am meant to use the cylinder as a wind turbine blade root for telescoping the blade of a wind turbine(air filled and drained i suppose) (vary length over a hand calculated cycle time). thus may i please be assisted with the general setup and C_G motion udf if i only want to fluid domain which will rotate(circular blade motion) and translate(piston compressing fluid domain) for the following cases
1. with air release
2.without air release.

Thanks in advance
wandapop is offline   Reply With Quote

Old   September 1, 2017, 14:44
Default
  #5
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Hi, and welcome to the forum. Let me start off by saying I'm having a lot of difficulty visualizing your problem. Could you please provide some pictures of what you mean?
RaiderDoctor is offline   Reply With Quote

Old   September 7, 2017, 15:05
Default piston cylinder
  #6
New Member
 
Join Date: Aug 2017
Posts: 3
Rep Power: 8
wandapop is on a distinguished road
Hi, Raider Doctor


Thanks for the reply.please find attached problem description along with schematic. Furthermore, i have been informed to simulate only the fluid domain of the internal space of the piston cylinder chamer with air release and without air release.

kind regards
wandapop model with brief describtion.PNG
Attached Files
File Type: docx Project Topic.docx (149.5 KB, 10 views)

Last edited by wandapop; September 7, 2017 at 15:09. Reason: missing info
wandapop is offline   Reply With Quote

Old   September 13, 2017, 12:22
Default
  #7
Senior Member
 
Join Date: Dec 2016
Posts: 152
Rep Power: 10
RaiderDoctor is on a distinguished road
Sorry it took me so long to respond, but I haven't stopped thinking about your problem. So you want to use Fluent only to simulate a piston cylinder scenario (I realize that there is a little more to it, but the problem itself can be simplified to such). Here's the issue with doing that using only Fluent; you could easily calculate the motion of the piston head when the valve is bleeding the air out, but I'm unsure how you would do so when it isn't.

Let me explain, when you push on the head of the piston, the pressure inside the cylinder will increase to compensate. The volume will decrease, but I'm unsure by how much since I'm not sure what the initial pressure, volume etc. When you enter in this movement into the simulation, you will be creating a self-fulfilling hypothesis scenario. The pressure inside the cylinder should be exactly what you already calculated, since you used it to first calculate the change in volume. In short, you wouldn't be finding out anything new, only what you already calculated. If this is a validation simulation, or if you already have modeled this physically, that's fine. But if you are unsure how the piston will move in response the forces applied, I don't think using Fluent alone will help you.

Instead, what about using an FSI simulation? You could input the forces acting on the head of the piston to vary as a function of time (i.e. as the wind turbine rotates) and Fluent will calculate the resulting pressure inside the cylinder. Here, you would be able to find the change in volume among other quantities without the need for using a UDF.

I'm not trying to dodge your question, just thinking there might be a better solution available. Also, it's been a while since I've had to do any calculations related to piston-cylinders, so I might be a little rusty.
RaiderDoctor is offline   Reply With Quote

Old   September 18, 2017, 19:04
Default FSI interest
  #8
New Member
 
Join Date: Aug 2017
Posts: 3
Rep Power: 8
wandapop is on a distinguished road
Hi raider doctor,

your response is most appreciated in that it provides a realistic experimental observation as opposed to the self fulfilling simulation i was. However i would indeed appreciate a simple method of how to proceed in order to perform a fluid structure interaction as u suggest for a more convenient elaboration if you prefere my email address is

wndlduma@gmail.com

thanks in advance R.D
wandapop is offline   Reply With Quote

Old   September 29, 2017, 02:40
Default
  #9
New Member
 
leo
Join Date: Sep 2017
Posts: 15
Rep Power: 8
jinsong is on a distinguished road
you can firstly try to increase you time step,i am also a mew one.


Quote:
Originally Posted by Nick8529 View Post
Hi,

I am new to CFD and this forum. I am trying to use Fluent to simulate a hydrualic cylinder for a university project but I am having problems with the mesh.

I am using a define_CG_motion udf which which I can get to move the piston how I want but when I preview the mesh motion it will run through a few time steps but then says negative cell volume detects. I have searched this forum for an answer but cant find anything that works.

I have tried using smoothing, layering and remeshing and a combination of them but nothin works. When I watch the mesh motion the psiton will move and some cells compress but then when the cells get too small it fails. I thought that with the layering that when a cell got to a certain size it would collpase and with remeshing, it would remesh to adjust with the movement but this doesn't seem to happen.

Thanks for any help,

Nick
jinsong is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
3D Windturbine simulation in SU2 k.vimalakanthan SU2 15 October 12, 2023 05:53
Mesh Boundary Assignment Question Wandadars Mesh Generation & Pre-Processing 1 June 13, 2016 17:19
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 11:19
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Optimal mesh for moving boundary problem Luk_Fiz CFX 5 April 14, 2007 06:21


All times are GMT -4. The time now is 02:30.