|
[Sponsors] |
how to have a changing boundary condition at the in let of a tube |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 22, 2018, 14:04 |
how to have a changing boundary condition at the in let of a tube
|
#1 |
New Member
karri Veerandra Yadav
Join Date: Jul 2016
Posts: 2
Rep Power: 0 |
I have a tube as shown in the attachment, which as a open end and a close end , open end is connected to a high pressure source of pressure 5 bar for a time period of 0.005 sec and for closed for a time of 0.0001 sec and again connected to a low pressure source of 1 bar for again a time period of 0.002 sec.
Is it possible to write a udf to change a boundary condition at the open end of the pipe from pressure inlet ( for a time period of 0.005 Sec) to wall (for a time period of 0.0001 Sec) to pressure outlet ( for a time period of 0.002 Sec). i.e. the pipe open end must act as a pressure inlet (for a given time period), then it must change to a wall Boundary condition (for a given time period), and after that it must change to pressure out let (for a given time period). and soo on |
|
June 22, 2018, 15:18 |
|
#2 |
Senior Member
Join Date: Dec 2016
Posts: 152
Rep Power: 10 |
I don't know about how to do this with a UDF, but you can do it manually! There's also a way to do it with "Events", but I haven't really played around with that too much. The basic idea is that you want to break your simulation up into phases that feature the different boundary conditions. You will change the conditions at the end of the time step previous to when you want your conditions to take effect, and then continue the calculation.The steps really aren't that hard once you do it once or twice, but learning it based on text alone might be tricky. I'm going to give it a try anyway.
1.) Set the inlet as the first boundary (pressure inlet of 5 bar). 2.) Run the simulation for 0.005 s. 3.) Close Fluent, and save your project. 4.) Open the Solution section on the Fluent module (I'm assuming you are working from workbench). 5.) Click File, Solution Files. A new menu should appear called "Solution Files". Ensure that your last time step is selected (0.005 s). Close the Solution Files menu. 6.) Go to the Boundary Conditions section on the Tree. Click your inlet, and switch the Type to "wall". 7.) Click File, Export, Case and Data. This will bring up a save menu with all of your previous solution files in it. This is important, do not change the name of the case file. You want to continue calculation from it with one minor change. Click okay and nothing else. This will cause Fluent to say something along the lines of "Okay to overwrite case and data?". Click Yes, and wait for Fluent to finish writing the case and data files. Don't initialize or anything, it is already initialized from the previous simulation. 8.) Run the simulation for a period of 0.0001 s (or however long you need the inlet to be set as a wall). 9.) Repeat steps 5-8 for changing the inlet boundary condition again. Let me know if this works out for you! |
|
June 23, 2018, 02:06 |
|
#3 | |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The task of changing the boundary conditions during a simulation can be performed automatically using a Scheme script, called with a Calculation Activity.
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |
cyclic boundary condition doesn't work in a tube ?? | Cyp | OpenFOAM | 6 | April 16, 2010 16:21 |