CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

internalField condition

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 2 Post By jmdf
  • 2 Post By jmdf
  • 1 Post By jmdf
  • 1 Post By Aina
  • 2 Post By Tobermory
  • 1 Post By Tobermory
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 20, 2015, 09:50
Default internalField condition
  #1
New Member
 
Tiko
Join Date: Nov 2015
Location: Detroit, Michigan
Posts: 15
Rep Power: 10
mchehab2 is on a distinguished road
Hi Folks,

In the bubbleColumn tutorial of multiphase flow, they have used
internalField nonuniform List<vector>
1875 scalars for alpha
and 1875 vectors for Ua and Ub.

Would anyone tell me where did they get the scalars and vectors from? ( i didnt find them in the PolyMesh folder). Also, i would like to know what is the difference between
internalField uniform ( 0 0 0); and
internalField nonuniform List <vector>

and the difference between
internalField uniform 0; and
internalField nonuniform List <scalar>

Thank you,
mchehab2 is offline   Reply With Quote

Old   November 20, 2015, 10:11
Default
  #2
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 11
jmdf is on a distinguished road
Hi,

internalField uniform (0 0 0) - with this you define that all the internal elements of the mesh (not boundaries) have the value (0 0 0). The same applies for a scalar value.

internalField nonuniform List <vector> or <scalar> - you can set a list of values for the internal elements of the mesh. For example, for the velocity field, if you know its distribution you can use it by setting this type of list. The number of entries of the list is the number of internal elements that your mesh has.
rasool_soofi and mchehab2 like this.
jmdf is offline   Reply With Quote

Old   November 20, 2015, 10:14
Default
  #3
New Member
 
Tiko
Join Date: Nov 2015
Location: Detroit, Michigan
Posts: 15
Rep Power: 10
mchehab2 is on a distinguished road
Quote:
Originally Posted by jmdf View Post
Hi,

internalField uniform (0 0 0) - with this you define that all the internal elements of the mesh (not boundaries) have the value (0 0 0). The same applies for a scalar value.

internalField nonuniform List <vector> or <scalar> - you can set a list of values for the internal elements of the mesh. For example, for the velocity field, if you know its distribution you can use it by setting this type of list. The number of entries of the list is the number of internal elements that your mesh has.
Hi Joao,

So the entries are random numbers i choose them, or i get them from a certain directory.
mchehab2 is offline   Reply With Quote

Old   November 20, 2015, 10:27
Default
  #4
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 11
jmdf is on a distinguished road
I'm not familiar with the tutorial you mentioned, although the alpha and U values are probably an initial distribution of the field in the internal elements.

For example, if you use the potentialFoam it will give you an initial "guess" of the velocity field on a certain case. Which is then used by the other solver you are using to solve the case.

I don't think you can find those values in any directory. Those values can be either obtained by using another solver or are known from the start.
mchehab2 and rarnaunot like this.
jmdf is offline   Reply With Quote

Old   November 20, 2015, 10:30
Default
  #5
New Member
 
Tiko
Join Date: Nov 2015
Location: Detroit, Michigan
Posts: 15
Rep Power: 10
mchehab2 is on a distinguished road
the point is that there is 1875 values for both scalars and vectors, So i dont think i have to set them by guessing
mchehab2 is offline   Reply With Quote

Old   November 20, 2015, 10:38
Default
  #6
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 11
jmdf is on a distinguished road
Obviously you don't have to guess them, remember that it's a tutorial and so it's ready to be solved.

I was trying to explain the difference between the uniform and nonuniform entry on the internalField, as I said i'm not familiar with that tutorial.
mchehab2 likes this.
jmdf is offline   Reply With Quote

Old   November 20, 2015, 10:48
Default
  #7
New Member
 
Tiko
Join Date: Nov 2015
Location: Detroit, Michigan
Posts: 15
Rep Power: 10
mchehab2 is on a distinguished road
i see. It seems that you have a strong background about internal and boundary conditions, So i would like to ask if you can help in this case. I am trying to model a multiphase case study. i have two flows from two inlets. in the simulation, i need to see two flows coming from two inlets and leaving from one outlet. what would be the boundary conditions?
Meshing parts( inlet1 , inlet 2, walls, and outlet). constant velocity at inlet1 and changing velocity for inlet2 and changing velocity of the mixture at the outlet)
mchehab2 is offline   Reply With Quote

Old   November 20, 2015, 10:53
Default
  #8
New Member
 
Tiko
Join Date: Nov 2015
Location: Detroit, Michigan
Posts: 15
Rep Power: 10
mchehab2 is on a distinguished road
Jao, here is the model
Attached Images
File Type: png Guru Pic.PNG (22.0 KB, 90 views)
mchehab2 is offline   Reply With Quote

Old   November 23, 2015, 06:10
Default
  #9
Member
 
Joćo Ferreira
Join Date: Nov 2014
Location: Braga, Portugal
Posts: 53
Rep Power: 11
jmdf is on a distinguished road
Hi,

I can try to give you some guidance, although my experience with two phase flows is not that big.

If you give me some more time I will give you a more information, I am having a lot of work at the moment.

Anyway, as far as I understand you need to define the properties of both fluid on the constant folder in separate files.
To define the boundaries, you need to create a file for each phase. As you can see on the tutorial you mentioned, you have two different files for several field (*.air and *.water). So, try to create these files for the two different phases you have.
The inlets, for example, if you want air to enter on "inlet1" you define it on the "U.air" and on the same inlet, but for the other phase, you define it as zeroGradient.

I am not totally sure if i'm correct because I need to look into the tutorial with more time.

I suggest you to try what I said and maybe sent me your case so I can have a look. Anyway, I will try to give a more complete answer as soon as I have time!
jmdf is offline   Reply With Quote

Old   May 28, 2021, 07:36
Default call "nonuniform List<vector>" from external field
  #10
New Member
 
Aina
Join Date: Jan 2020
Location: Spain
Posts: 9
Rep Power: 6
Aina is on a distinguished road
Hi everyone,

I want to execute a simulation from a velocity internal field. Besides, I want to modify the inlet boundary condition of the file U. Because in the list vector of there is a lot of information and it is complicated to access the other boundary conditions, I would like to know is if it is possible to call the list vector from another file so the file U doesn't contain explicitly the velocity internal field.




dimensions [0 1 -1 0 0 0 0];

internalField nonuniform List<vector>
374400
(
(0.682663 -0.000238802 -0.000802975)
(0.670924 -0.000411373 0.000593453)
.
.
.



Thank you,
rarnaunot likes this.
Aina is offline   Reply With Quote

Old   May 28, 2021, 10:09
Default
  #11
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Well, if I have understood you correctly, you could remove the internal field dictionary entry
Code:
internalField   nonuniform List<vector> 
31250
(
...
)
and place it in a separate file in the same folder, say UinternalData.dat, and then just add an include statement in the U file, to read it in:

Code:
#include "UinternalData.dat"
That will "tidy up" your U boundary file for that time step. Of course, when the solver writes the next time step, it will be in regular OpenFOAM format.

A question back for you - why do you need to do this? Do you just want to skip over the internalField data when viewing the file? If yes, just do a search on boundary and it will take you past it. Or do you have code that is trying to read and update the U file, and you again want to skip past it? What's the root problem? There may be a better way of solving it than the above brute force approach.
rarnaunot and Aina like this.
Tobermory is offline   Reply With Quote

Old   May 31, 2021, 10:56
Default
  #12
New Member
 
Aina
Join Date: Jan 2020
Location: Spain
Posts: 9
Rep Power: 6
Aina is on a distinguished road
Hi Tobermory,

I want to initialize a simulation with a velocity internal field, but I want to change the inlet velocity profile, so I need to do this because my U field is very big and when I want to modify it, my editor crashes. I will try your recommendation.

Thank you
Aina is offline   Reply With Quote

Old   May 31, 2021, 12:20
Default
  #13
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 668
Rep Power: 14
Tobermory will become famous soon enough
Aaah - I understand now - and yes, gedit crashes on my Ubuntu machine if I try edit a large file. Command line editors like vim seem to work fine though - maybe nano does as well (easier to use than vim). That could ba another alternative, without the hassle of include files.
Aina likes this.
Tobermory is offline   Reply With Quote

Old   June 1, 2021, 05:13
Default
  #14
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Another way is to use the changeDictionary utility to update your boundary conditions.



Cheers,
Yann
Tobermory likes this.
Yann is offline   Reply With Quote

Old   November 10, 2022, 13:28
Default Updating the nonuniform List<vector>
  #15
New Member
 
Any State
Join Date: Apr 2022
Posts: 2
Rep Power: 0
arturo13421 is on a distinguished road
Hello,
Using the Tutorial periodicplannechannel, when I access the 0 folder, most of my varaibles (p and U) have internalField nonuniform List<vector>
60000

This works when my mesh has 60000. I have updated my mesh to the mesh I need to use. My new mesh has 120000 thus it needs 120000 values and not the 60000 that are currently in the folder.

Does anyone know how can I update my folders (U and p) for them to have 120000 numbers?

Thankyou
arturo13421 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
The difference of cyclic boundry condition and mapped boundary condition caitao OpenFOAM Running, Solving & CFD 1 December 4, 2019 07:29
Similar boundary condition to zero flux condition Navip OpenFOAM Running, Solving & CFD 0 August 13, 2015 04:04
Accessing multiple boundary patches from a custom boundary condition file ripudaman OpenFOAM Programming & Development 0 October 22, 2014 18:34
what "If" condition means in rebound brbbhatti OpenFOAM Programming & Development 0 August 12, 2014 09:18
Internal flow operating condition? kookguy FLUENT 2 June 26, 2014 00:15


All times are GMT -4. The time now is 15:31.