CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > CONVERGE

Inflow Boundary Condition - adding a velocity profile

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2016, 10:26
Default Inflow Boundary Condition - adding a velocity profile
  #1
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
[Using CONVERGE 2.2.0]

Dear all,

I have a little question on importing a velocity profile in the inflow boundary condition section.

The file I want to import has the extension of '.dat' and is built as the velocity import section shows, namely: time, first spatial coordinate, second spatial coordinate, third spatial coordinate, velocity where the first line of this file contains their titles 'seconds x y z w'

The problem is that CONVERGE shows the following error:
'Wrong file format. Expected 'TEMPORAL', 'SPATIAL' or 'TABULAR' keywords but found 'second, x, y, z, w'

I've attached the concerning file in appendix but I uploaded it as a '.txt' file as the forum didn't want to upload it as '.dat'velocity-28-Jun-2016.txt

I guess the 'structure' of my file is wrong.
I tried to leave my titlle ('seconds x y z w') out but this didn't seem to be the problem.

I hope this problem is easily solvable!

Thanks for your time,
Cedric
cedame is offline   Reply With Quote

Old   June 28, 2016, 11:01
Default
  #2
Senior Member
 
Tobias
Join Date: May 2016
Location: Germany
Posts: 264
Rep Power: 10
MFGT is on a distinguished road
If you use it as Input file, why doesnt you name it .in?

And first 3 lines should be e.g. for a 720 °CA cyclic profile:

Quote:
TEMPORAL
CYCLIC 720.0
crank x y z

....
propably in your case these first two lines are missing?

TEMPORAL
SEQUENTIAL
MFGT is offline   Reply With Quote

Old   June 28, 2016, 11:05
Default
  #3
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
Hello,

I solved the mistake.
Now it looks as in attachment. velocity-28-Jun-2016.txt
I had to specify some other things.
And indeed I now used '.in'


Thanks,
Cedric
cedame is offline   Reply With Quote

Old   June 28, 2016, 12:00
Default
  #4
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
Hello all,

When running the calculation, CONVERGE gives me this error:

file name velocity-28-Jun-2016.in given for velocity boundary condition
reading velocity-28-Jun-2016.in data from file velocity-28-Jun-2016.in
error: not enough heading in file velocity-28-Jun-2016.in expected: V


Where velocity-28-Jun-2016.in is the name of my velocity profile

I've looked to be sure that the file has a consistent spacing.
This doesn't seem to be the problem.
So I can't find the solution to it.


Thanks,
Cedric
cedame is offline   Reply With Quote

Old   June 29, 2016, 10:01
Default
  #5
Member
 
alemoine's Avatar
 
Allie Le Moine
Join Date: Jan 2016
Location: Convergent Science, Madison WI
Posts: 39
Rep Power: 10
alemoine is on a distinguished road
Hi Cedric,

This question has also been answered under the "Conjugate Heat Transfer" thread.

The proper format for a spatially varying velocity boundary conditions is:

SPATIAL
1.0 scale_xyz
0.0 trans_x
0.0 trans_y
0.0 trans_z
x rot_axis
0.0 rot_angle

0.0 second
x y z u v w
0.008 0.008 0.100 0.0 0.0 1.0
0.008 0.008 0.100 0.0 0.0 1.0
__________________
Allie Le Moine
Research Engineer | Applications
CONVERGECFD
alemoine is offline   Reply With Quote

Old   June 29, 2016, 10:38
Default
  #6
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
Hello Allie,

OK,thank you for your reply.

CONVERGE gave me another error after this issue.
It says that I have to change the steady_solver in inputs.in to another type.
Initially I set it on steady_solver = 1 ( steady pressure based).
CONVERGE tells me to change it to 2 or 3 ( resp. steady density-based, steady density-based on local cell time-steps).
I changed it to steady_solver =2 and it worked,
but I don't really understand why my velocity profile can't be used with the steady pressure based solver?
Would this imply a physical contradiction ?


Thanks for your time,
Cedric
cedame is offline   Reply With Quote

Old   June 29, 2016, 16:40
Default
  #7
Member
 
alemoine's Avatar
 
Allie Le Moine
Join Date: Jan 2016
Location: Convergent Science, Madison WI
Posts: 39
Rep Power: 10
alemoine is on a distinguished road
Cedric,

Currently the option to set a spatially-varying velocity inlet profile is limited to our density-based steady state solvers (steady_solver 2 and 3) and has not been enabled for the pressure-based solver. Therefore, if you need to set this type of inlet profile, you will need to use one of the density based solvers.
__________________
Allie Le Moine
Research Engineer | Applications
CONVERGECFD
alemoine is offline   Reply With Quote

Old   June 30, 2016, 05:27
Default
  #8
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
Hello Allie,

Thank you very much for your reply.

Now I created a velocity profile in the required format and chose steady_solver = 2.
CONVERGE gives me following error:
Something is wrong in function get_temp_from_table_massfrac: upper_energy_value must be greater than lower_energy_value!
upper_energy_value is nan, and lower_energy_value is nan .


Where do I have to look to find the error ?
What could it possibly be ?

Cedric
cedame is offline   Reply With Quote

Old   June 30, 2016, 09:52
Default
  #9
Member
 
alemoine's Avatar
 
Allie Le Moine
Join Date: Jan 2016
Location: Convergent Science, Madison WI
Posts: 39
Rep Power: 10
alemoine is on a distinguished road
Hi Cedric,

This error message is an indication that an equation is not converging however with little information provided, it is difficult to determine why. The following information would be very helpful in trying to diagnosing the error:
  • set screen_print_level = 2 (located in inputs.in). This will print out the information for every iteration of every equation. If your solution is converging, you should see that the error is decreasing over each iteration and what you are looking for is any point in the simulation where the solution begins to show some divergence
  • at what time does the solution begin to diverge? If it is at the very beginning of the simulation, then this is an indication of incorrect initial conditions and/or boundary conditions. If the solution is diverging later in the simulation, what is happening at that time? Are there any models that are being activated?
  • what type of simulation are you trying to run? Would you be able to explain the case setup in more detail?
  • you mentioned that you are using the steady_solver = 2, did you set this up in Studio and set the recommended values?
__________________
Allie Le Moine
Research Engineer | Applications
CONVERGECFD
alemoine is offline   Reply With Quote

Old   July 1, 2016, 07:09
Default
  #10
New Member
 
cedric ameloot
Join Date: Apr 2016
Posts: 11
Rep Power: 10
cedame is on a distinguished road
Hello Allie,

Yes of course, I didn't know how much info I have to specify to give a minimal working example.
So I will detail the case now.
If this is too detailed, let me know and I will make it more concise.

  1. Situation:
    hot fluid flow in an internally insulated steel cylindergeometry1.PNG.
    The fluid is given speed to have the fluid at a ( more or less ) constant high temperature.
    To consider the fluid in steady state conditions, I want to give the inflow a velocity profile.
    To reduce calculation time, only a quarter cylinder is considered, with symmetry boundaries at the sides.

  2. Purpose: study the radial heat transfer through insulation to reduce outer temperature

  3. Case setup:
      • Gas = ideal gas with species 02 and N2
      • Solids = steel and appropriate insulator, with properties specified in 'solid simulation'
      • All materials are specified in species.

    1. The steady solver is chosen as density based steady solver and the simulation mode is full hydrodynamic.

      • The start time and end time are resp set on 0 and 100000 cycles with an initial time step of 0.000125s,
        a minimum time step of 0.000125s and a maximum time step of 1s.
        These have been approximated from the delta t in the formulas of the theory manual p108, CH 5, section 5.2.4
      • The others values of this section 'simulation time parameters' are set on the recommended values.
      • The numerical parameters haven't been changed, they are left as they are.
      • The output parameters are standard ones.

      • The boundary conditions are 19 in total (boundaries.PNG) and are set up as follows :
      • The sides all have symmetry conditions.
      • The front of the cylinder has an inflow condition for the fluid
        and two wall conditions, one for the insulator layer and one for the steel.
      • These wall conditions have a stationary, no slip velocity condition
        and a zero normal gradient temperature condition.
        At the back of the geometry, similarly, the conditions are : outflow, wall, wall.
      • The wall conditions have the same conditions as those of the front of the geometry.
      • For the inflowinflow.PNG and outflowouflow.PNG boundary conditions I took a printscreen in appendix .
      • To link the different materials, I made two interfaces.
      • One interface for the fluid - insulator boundary and one for the insulator - steel boundary.
      • Respectively, the forward and reverse boundaries are:
        - fluid boundary and insulator boundary (for first interface)
        - insulator boundary (a second one) and steel boundary (for second interface)
      • The fluid boundary is specified as a stationary wall law of wall condition for velocity and temperature.
      • The two insulator boundaries and the steel boundary are stationary walls with no slip for the velocity and a specified value for the temperature.
      • The tickbox 'coupled' is selected for all four of them.

      • The initialization is done as in the picture with the regions.
      • Three regions are defined: fluid, coat ( insulator ) and steel init.PNG

      • Super cycle modeling has been switched on.
      • The supercycling data begins to be stored after 0.05s, every 0.05s with a conduction CFL number of 100.

      • A base grid has been chosen of 0.004 - 0.004 - 0.01 (x - y - z) for a geometry that is 0.05 - 0.05 - 0.1
      • 4 fixed embeddings have been chosen at the boundaries between materials.
      • If we consider the geometry from inside to outside:
        we have the fluid, the insulator layer and the steel cylinder.
      • Hence an embedding has been specified for the fluid boundary (scale=3, embed layer=4),
        the insulator boundary at the fluid side(scale=3, embed layer=5),
        the insulator boundary at the steel cylinder side(scale=3, embed layer=5),
        and the steel cylinder boundary itself (scale=2, embed layer=4).

  4. I activated the screen print level = 2 and I see that the pstar error varies between 10^(-7) and 10^(-6) until CONVERGE reaches cycle 17
    ( out of 100000, so quite in the beginning of the calculation ).
    At this moment the error reaches orders of magnitude of 10^(-2).

  5. About the steady_solver = 2 : I set it up in the Studio and I selected recommended values in the 'simulation time parameters' section.

  6. After considering what you said in your previous post, I think the problem is in the initialization or in the boundary conditions but I cannot find any issue.

Is there is any problem with the way I posted this message, please let me know.

Thank you for all your help!
Cedric
cedame is offline   Reply With Quote

Old   December 12, 2017, 16:58
Default time-dependent boundary condition
  #11
New Member
 
martia
Join Date: Oct 2016
Posts: 3
Rep Power: 9
martia65 is on a distinguished road
I want to set up a time-dependent velocity boundary condition as below:
t < 0.002 : V = 100
t > 0.002 : V = 0

Actually, the injection should stop at 2 ms.
I tried to use file in velocity boundary condition and made this unsteady.in file:

TEMPORAL
SEQUENTIAL
second velocity
0.00000 100.0
0.00200 100.0
0.00201 0.0
0.00600 0.0

However, it does not work, and I get this error:

[velocity_file] -> unsteady.in. Wrong file format. Expected: 'second', but found 'second velocity'.

Anyone can help me on this?
martia65 is offline   Reply With Quote

Old   December 12, 2017, 17:47
Default
  #12
Member
 
tmburton's Avatar
 
Tristan Burton
Join Date: Sep 2017
Posts: 92
Rep Power: 8
tmburton is on a distinguished road
Martia,

CONVERGE is expecting the three components of the velocity in your file:

TEMPORAL
SEQUENTIAL
second u v w
1.0 8.0 0.0 0.0
2.0 12.0 0.0 0.0
3.0 8.0 0.0 0.0

Best regards,

Tristan
__________________
Tristan Burton
Senior Principal Engineer
CONVERGECFD
tmburton 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
Time dependant pressure boundary condition yosuke1984 OpenFOAM Verification & Validation 3 May 6, 2015 06:16
Low Mixing time Problem Mavier CFX 5 April 29, 2013 00:00
Velocity profile boundary condition Tuca FLOW-3D 1 April 23, 2013 12:02
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
Profile Data Velocity Boundary Condition Changes?? Maria Angelica CFX 9 June 14, 2006 02:44


All times are GMT -4. The time now is 20:25.