|
[Sponsors] |
April 14, 2020, 12:16 |
Setup Issues
|
#101 |
Senior Member
|
There are a multiple issues and shortcomings with the setup.
1. Set Operating Pressure to 0 under Operating Conditions. 2. You are using a constant density material. That will not work. It has to be defined as compressible liquid. 3. The profile you are using at the inlet must provide absolute pressure value and not gauge pressure. So, it must start from a positive value and the value should be high enough to stop the piston movement or slow it down. 4. Do NOT set CG as 0.03 in Dynamic Mesh settings. Leave it at 0. 5. During initialization, set all velocities to 0 and pressure equal to first value in your profile. Use standard initialization. 6. Do NOT save case and data files every time-step. On one hand, this will require huge space on your hard-drive but that's a smaller issue. Larger issue is that the simulation will take ages to complete because I/O takes time. A few suggestions 1. Use Coupled scheme instead of PISO. PISO might or might not work. 2. Use Least-Square for gradient calculation. Node based will slow down the system without any extra advantage. 3. You can use time-step of 1 ms, except in the beginning. In the beginning, keep it at 0.1 ms and after 10-20 time-steps you can increase it to 1 ms or even larger. 4. I have not checked but you should check it at your end if the flow is really laminar. If not, enable turbulence.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 14, 2020, 13:13 |
|
#102 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
hey again,
2- the material of the fluid is oil , it's incompressible, why should i define it as compressible 3- i don't understand what u have said about absolute pressure |
|
April 14, 2020, 13:23 |
Compressibility
|
#103 |
Senior Member
|
There is no incompressible fluid. All fluids are compressible; some are less compressible while some are more. You can use it as incompressible but then it would lead to oscillations in the movement and it won't be smooth because the speed of sound in an incompressible fluid is infinite.
Fluent and most of the CFD tools work in gauge pressure. However, the density of compressible fluids always depend on absolute pressure and not on gauge pressure. Therefore, the operating pressure should be set to 0 so that Fluent starts working in absolute pressure. In your profile, the value of the pressure starts from 0. However, there is no absolute 0 pressure. The absolute pressure in atmosphere is 101325 Pa. So, you should add 101325 Pa to all the values in your profile. And I am assuming that the values in the profile are in Pa. That's what Fluent assumes the unit to be; SI.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 14, 2020, 13:33 |
|
#104 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
thanks for the explanation, i'll try those tips.
|
|
April 14, 2020, 14:05 |
|
#105 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
i change it ti compressible fluid but it still show gauge total pressure
|
|
April 14, 2020, 14:31 |
Label
|
#106 |
Senior Member
|
Don't worry about the labels. Those don't change. You just need to change it to compressible liquid and set operating pressure to 0. Do note that the coefficients given for the compressible liquid are for water. You can use those to test your case but you will require coefficients for the oil to get accurate results.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 14, 2020, 15:32 |
|
#107 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
i tried all those tips for a laminar flow , it works for 10 steps and then i get the usual error (negative vol;ume cell )
it seems like this (the pressure) |
|
April 14, 2020, 15:42 |
Domain
|
#108 |
Senior Member
|
It's not just the pressure but the domain itself has gone wrong. You can clearly observe that the piston has gone above and beyond the top most boundary itself. That can happen only under one condition, the spring force at the piston bottom is too high and is pushing it against the oil pressure. You can try using the constraints available in the SixDOF settings. You can constrain the piston movement within certain bounds of z-coordinate, say, between 0 and 0.1 m, so that the piston stops moving if it reaches either 0 or 0.1 m. You should also check if the spring constant is correct or not. Secondly, it is possible that the direction of the preload is wrong. Preload can be negative or positive; because spring could be in pulled or pushed state.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 14, 2020, 16:29 |
|
#109 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
i sent u a PM to explain more
|
|
April 15, 2020, 05:17 |
Suggestions
|
#110 |
Senior Member
|
Initial volume or mass of the fluid in the cylinder does not matter. All that matters is the force balance. One force acting on the piston is fluid pressure. The other force is spring force. Since there is a preload on the spring, it is pushing the piston upward with a force of 877 N. To counter it, you need minimum pressure of the fluid in the cylinder to be
Anything more than this will force the piston down, however, that will certainly compress the spring. Since the spring is very stiff, a small movement, say of 1 mm, increases the pressure requirement a lot on the fluid side. If the fluid pressure is not increasing at the required rate, the piston will push through the head of the cylinder and that's what you observed. Try to debug one thing at a time. I'd suggest you use a spring with lesser stiffness or with 0 preload.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 06:32 |
A solution
|
#111 |
Senior Member
|
There is another way of solving your problem. Instead of using pressure inlet, use mass flow inlet. In that case, you can work with constant density oil. I tried with a mass flow rate of 0.0005 kg/s and it works very nicely. You can use a profile for mass flow inlet. This mass flow rate could be determined using pressure inside the chamber and the pressure profile you have. For the testing purpose, just try with a simple profile. Once you get it working, then you can work on developing a mass flow rate profile.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 06:56 |
|
#112 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
but pressure inside the chamber it's an unkown of the simulation and i want it as a solution for the problem (i know that pressure won't vary much comparing with the pressure of the inlet)
also for the sectin, we talk about S of the orifice as i know this is the relation ? |
|
April 15, 2020, 07:13 |
Pressure in the Chamber
|
#113 |
Senior Member
|
The chamber pressure would be more or less uniform. With constant density fluid, it would be exactly same everywhere since information is transferred instantly. You can plot the volume averaged pressure while running at a constant or variable mass flow rate and then use it to determine a mass flow rate profile. An easier approach is to use UDF. You can use DEFINE_PROFILE to apply mass flow rate and the value of mass flow rate could be function of pressure inside. You can use the average pressure on the inlet to define mass flow rate at the inlet.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 07:52 |
|
#114 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
but i have only a table of values of pressure in function of time ?
how could i use that in a udf ? ,(don't know how to define a udf properly) |
|
April 15, 2020, 08:11 |
Udf
|
#115 |
Senior Member
|
Here is a sample that you will have to modify as per your simulation
Code:
#include "udf.h" #define refP 101325 /* This is just a reference pressure. In reality, this should correspond to the absolute value of the pressure profile you have */ DEFINE_PROFILE(massflowrate, t, i) { real f; /* face index. Fluent automatically provides this in the loop below */ real pin; /* pressure at the inlet */ begin_f_loop(f, t) { pin = F_P(f, t); /* This is a macro that provides pressure for a face f */ F_PROFILE(f, t, i) = ((refP - pin)/refP) * 0.0001; } end_f_loop(f, t) }
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 08:46 |
|
#116 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
so i have to enter every value of pressure i have ?
for the equation i have to enter qm= (2*(S pow2)*rou*pressure)pow0.5 ? |
|
April 15, 2020, 09:00 |
Pressure profile and mass flow rate
|
#117 |
Senior Member
|
Pressure profile can be read from the file. If the data contains only a small number of points, say 100-200, then those can be copied in the UDF and assigned to a variable. However, if those are in thousands, then that can be read via fscanf in C. It is very simple and need to be done only once. Look at the example below.
https://www.geeksforgeeks.org/scanf-...e-yet-poweful/ As far as equation for the mass flow rate is concerned, I can only give one comment - it must be a function of pressure inside the chamber as well as pressure outside the chamber. You can try with the equation you have. Actually, your system will work even with the pressure profile you have, however, that pressure profile must be such that the pressure is close to the pressure in the chamber at a particular instant, such as, if at time 1 s, pressure in the chamber is 80000 Pa the pressure value in the profile should be slightly smaller or larger than this; if it is way off then the piston will move all of a sudden and cause negative volume to appear.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 09:18 |
|
#118 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
that's mean it will always give that error
this is pressure inlet given by a sensor |
|
April 15, 2020, 09:24 |
Pressure Profile
|
#119 |
Senior Member
|
This is gauge pressure. Add 101325 Pa to each value and then apply that pressure profile and see if it works. Is the piston always supposed to move downward, i.e., always away from the head?
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
April 15, 2020, 09:27 |
|
#120 |
Senior Member
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6 |
this is what they give me in the begining
i have added 101325 Pa as u have said but it still move away from the head, and the piston is supposed to move only 2 mm the right (the stroke) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AVL FIRE ESE Diesel piston simulation initial condition | rdrd4u | AVL FIRE | 1 | July 15, 2015 01:53 |
Simple piston movement simulation | ReVl27 | FLUENT | 1 | February 20, 2015 08:28 |
variable density in single fluid simulation not running with total energy | viking | CFX | 2 | September 18, 2012 20:19 |
Expert parameter to stop the fluid flow simulation | KK | CFX | 1 | February 25, 2008 16:29 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |