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

Channel with repeated geometry

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2005, 19:44
Default Hello! I am a new OpenFOAM
  #1
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello!

I am a new OpenFOAM user, and I am trying to use it to simulate the laminar water flow on a nanofiltration spiral wound channel. It is a rectangular cross section channel with about 200 cylindrical spacers:
__________________
_o__o__o__o__o__o_

The goal of this work is to verify for which Re number the flux become unsteady.

The geometry _o_o_ repeats itself throughout the channel, so what I want to know if the rigth way to do it is simulate only one section of the geometry, and to define the inlet and outlet of that repeated geometry as "cyclic".

And how can I specify the channel Reynolds, since I dont have the possibilty to enter any inlet fluid velocity on cyclic patch type?

Hope someone can help me on this!

Jose Santos
santos is offline   Reply With Quote

Old   May 7, 2005, 05:49
Default Hi Jose, Just for interests
  #2
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Hi Jose,

Just for interests sake, which way is the fluid flowing in this channel:

__________________
_o__o__o__o__o__o_


From left to right -> or from front to back?


In either case you can almost certainly specify the inlet-outlet patch combination as a cyclic pair provided you capture enough ribbs. To find out how the mass flux would be fixed, take a look at the code channelOodles
and its tutorial example. The code adjusts an imposed pressure-gradient in the domain along the direction of your specified bulk velocity such that the actual mass flow rate tends toward the target value. The pressure gradient driving force is not a 100% accurate approximation for your case, but it should suffice for most such applications.

The channelOodles solver should be sufficient for your purposes as well, just change the LESmodel to laminar.
eugene is offline   Reply With Quote

Old   May 8, 2005, 18:15
Default Hello Eugene! Thank you ver
  #3
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello Eugene!

Thank you very much for your help, I think I am making some progress!

Instead of using the geometry that I described before, I am using a baffled channel, because I have some experimental data to compare with (Roberts, A numerical and experimental study of transition processes in an obstructed channel flow, 1994, J.Fluid.Mech.).

The geometry is the following:

--|---|---|---|---|---|---|---|---|---|
->
_|__|__|__|__|__|__|__|__|__|__

I have chosen to simulate only one baffled cell:

|---|

|__|

The fluid is flowing from left to rigth. Like you suggested, I have used the channelOodles code, changed the LESmodel to laminar, and specified the inlet-outlet patch combination as cyclic. I changed Ubar to the velocity that corresponds to Re=134, 0.0048 m/s. As for the initial U field, I specified it also as 0.0048 m/s (is this correct, or should I keep it as zero?).

I tried to run it with a course grid for 30 seconds and for these conditions, the flux eventually becomes steady after 20-25 seconds, with some large recirculation regions on upper and lower sections of the cell, and a straigth flux region connecting the inlet and outlet with U~0.0048 m/s.

However, in accordance with the previously mentioned work of Roberts, for this Re, the flux becomes assymetric and unsteady, leading to a eddy shedding regime.

A coleague of mine successfully obtained an unsteady flux exactly for these conditions on Ansys CFX, but he had to add a source term, proportional to the gravity.

Do you think that my approach was correct? And should I follow my colleague advice and try to add a source term to obtain unsteady flux?

Jose Santos
santos is offline   Reply With Quote

Old   May 9, 2005, 04:06
Default Is the mesh you are using as f
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
Is the mesh you are using as fine as that used by your colleague? What discretisation schemes are you using?
henry is offline   Reply With Quote

Old   May 9, 2005, 05:43
Default Hi Jose, Glad to hear you a
  #5
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Hi Jose,

Glad to hear you are making progress. From your comments thus far you seem to be doing everything correctly, but as Henry implied we need to know the details of your setup to be able to comment on your solution. Specifically, it would be useful if you post a copy of your fvSchemes and fvSolution files (unless of course they are identical to the channelOodles tutorial versions).

From what little I know of your problem, it seems highly unlikely that the addition of a gravity source term would (or should) affect the solution in any significant way. In CFX the additional term might just introduce some initial instabilities because of numerical errors, but thats the only influence I can imagine.

Things you might want to try in the mean time:
1) Increase your mesh resolution. You can only resolve perturbations on the scale of the mesh or larger.
2) Add a tiny little bit of asymmetry via your boundary conditions (i.e. shift baffle height). I always find it helps to get things started and if you make it small enough, it wont effect the overall solution.
3) Perturb the initial velocity field.
4) Try the CrankNicholson time discretisation scheme. It is less dissipative than backward differencing.

Remember predicting transition from laminar to unsteady flow in symmetric problems is notoriously difficult even at the best of times. Anyway, let us know how it turns out.
eugene is offline   Reply With Quote

Old   May 9, 2005, 13:17
Default Hello Henry Weller and Eugene!
  #6
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello Henry Weller and Eugene!

I have used blockMesh to generate my mesh, while my colleague used the CFX mesh generator. Anyway, I think his mesh is finer than mine.

I have used the standard chanelOodles discretisation schemes, and also the standard fvSolution file.

Today I tried to simulate the flux for a Re number of 400 (previously was 134) and for 100 seconds. After 50-60 seconds the flux become unsteady and oscillatory, so I guess I should have waited longer for the other Re simulation, which I am repeating right now.

Now a question arises: is it possible to disturb my system to obtain this oscillatory behaviour sooner? Maybe using Eugene suggestion of shifting baffle height (I will try this as soon as the current simulation ends)?

Other question: how can I monitor in OpenFOAM an hypothetical solute concentration distribution inside the cell, for example NaCl (sodium chloride)? Do I need to change the solver code? I have looked at all the tutorials and didnt find anything related to this.

Best regards,
Jose Santos
santos is offline   Reply With Quote

Old   May 9, 2005, 15:35
Default A good way of starting unstead
  #7
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
A good way of starting unsteady problems is to map the solution from a previous run. In your case you could try scaling the velocity field from the higher Re run to the lower speed and start from that. If you change mesh you could map the previous solution using mapFields.

I am not sure what you mean by "concentration distribution inside the cell", do you mean you wish to solve a transport equation for the concentration distribution of NaCl?
henry is offline   Reply With Quote

Old   May 9, 2005, 17:36
Default Hi Jose, There are several
  #8
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Hi Jose,

There are several ways to perturb a system. Some that I have used in the past:
1. Add random fluctuations to the velocity field. (doesnt always work as the perturbations get damped out real quick)
2. Add unstable structures like undulating streaks or vortices to the velocity field. (generally works very well but requires different perturbations for different cases)
3. Bias the inlet velocity distribution (not applicable in your case)
4. Add some asymmetry to the domain boundaries (particularly effective in regions of high velocity gradient, like sudden contractions).

Options 1 and 2 require you to write some code, but it should be fairly simple and a good learning experience. See the engineSwirl app for some pointers.

To track a passive scalar you will have to modify one of the solvers, channelOodles in your case. Don't worry though, adding a scalar transport equation is very easy to do. There are lots of examples throughout the code.
eugene is offline   Reply With Quote

Old   May 10, 2005, 22:45
Default Hi Henry Weller: Thank yo
  #9
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi

Henry Weller:
Thank you for your suggestions for starting unsteady problems. Ill try them as soon as possible. Concerning the concentration distribution, I want to calculate the NaCl (or other compound) concentration distribution inside the channel.

Eugene de Villiers:
I tried to add some assymmetry to the baffle sizes, and it worked quite well! I obtained an oscillatory flux earlier than before.

So what you both say is that I can introduce a transport equation for NaCl in the solver code. And what about the properties of NaCl? Should I define them elsewhere?

P.S. I think OpenFOAM developers should be proud for providing a tool that can solve, at least, the same problems that Ansys CFX solves. On the other hand, the user is not overwhelmed with the thousands of CFX options, and can actually learn a bit more about CFD - at least that is my experience with OpenFOAM.
santos is offline   Reply With Quote

Old   May 11, 2005, 05:39
Default What kind of problem exactly a
  #10
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
What kind of problem exactly are you trying to solve with the NaCl model, i.e. what are the boundary conditions, what does the transport equation look like. If you can provide this information, I should be able to give you a rough idea of what you need to do to implement the model. Typically, you will put the NaCl properties in a dictionary file from where the code will read them at the start of you calculation. You will also need to make a NaCl consentration field with the proper concentration boundary conditions.
eugene is offline   Reply With Quote

Old   May 15, 2005, 07:29
Default Hello Eugene! I am not tryi
  #11
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello Eugene!

I am not trying to solve anything specific, I just want to track the concentration of a given compound (I have referred to NaCl as an example).

Lets say I have an inlet concentration of 10 mol/m³ of NaCl. The concentration is zero inside the channel for t=0. So, I want to calculate what will be the concentration profile in the channel for a given time period.

I guess this may be very easy to implement in OpenFOAM, but I am bit lost!
santos is offline   Reply With Quote

Old   May 16, 2005, 09:32
Default Hi Jose So you want to do a
  #12
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Hi Jose

So you want to do a basic passive scalar transport. The reason I was uncertain is that we were discussing a period channel before, where there are no "inlets" to introduce the scalar at, so I assumed you wanted some other kind of source.

For example scalar transport implementation, look at the source code for "scalarTransportFoam". Stick this somewhere in the business end of your channelOodles solver. Some modifications might be neccesary, but the should be minor and self-evident.
eugene is offline   Reply With Quote

Old   May 16, 2005, 12:31
Default Hello Eugene Apologize me,
  #13
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello Eugene

Apologize me, because I guess you were rigth. I want to have a cyclic inlet-outlet. So in this case there are no inlets to introduce the scalar!

Should I try to stick the code from "scalarTransportFoam" in channelOodles, or for the case of cyclic inlet-outlet this doesnt apply?

Thanks for the help!
santos is offline   Reply With Quote

Old   May 30, 2005, 07:45
Default Hello again! For my case of
  #14
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello again!

For my case of cyclic inlet-outlet, is there an easy way of calculating the pressure drop and friction factor inside the channel?

Best regards,
Jose Santos
santos is offline   Reply With Quote

Old   May 30, 2005, 07:54
Default channelOodles calculates and p
  #15
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
channelOodles calculates and prints the pressure-drop from which you can calculate the friction-factor.
henry is offline   Reply With Quote

Old   May 30, 2005, 11:07
Default Hello Henry Weller So the "
  #16
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hello Henry Weller

So the "pressure gradient" that is printed is in fact the pressure-drop! Thank you very much for the help!
santos is offline   Reply With Quote

Old   May 30, 2005, 11:13
Default No the pressure gradient is th
  #17
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
No the pressure gradient is the pressure gradient, if you want the pressure-drop please just multiply by the length of the channel. If that is a problem you can change the code to print out the pressure-drop directly by including a multiplication by the length of the channel in the print-statement.
henry is offline   Reply With Quote

Old   May 30, 2005, 14:11
Default I noticed that earlier by look
  #18
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
I noticed that earlier by looking at the pressure gradient dimensions. In fact, I needed to multiply it by the density and divide it by the length to get Pa unit.

I think I will take your good suggestion, and change the code to print directly the pressure drop!

Anyway, I am glad that OpenFOAM is predicting quite well the pressure drop and friction factor inside my channel for low Re (<100), for which I have some experimental data. Now lets see how good it works for higher Re number!
santos is offline   Reply With Quote

Old   May 30, 2005, 14:15
Default On the previous message, pleas
  #19
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
On the previous message, please read "multiply it by the density and by the length"
santos is offline   Reply With Quote

Old   January 17, 2008, 09:07
Default Hi OF, In France, we have o
  #20
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi OF,

In France, we have one month to whish a new year so ... happy new year to all the community.
I need some help on the modelisation of a turbulent channel flow by LES, using one transport equation for the sub-grid kinetic energy.

I have a channel which is twice longer than the tutorial one (8*2*2). I use directMapped patch for inlet wich is suppose to feed the flow in the second part of my channel.
the outlet is a convective outlet (from Takuya).
My mesh is correct everywhere (wall) (checkMesh OK) with a size of 2e6 nodes

I changed oodles.C to keep the massflow average in the directMapped area (between inlet and inlet + offset)
the problem is that my subgrid kinetic energy is growing slowly and after 10 000 iterations it becomes more and more significant.

with paraFoam I see that the highest point is at the outlet (or at the end of the channel). I feel strange because convective outlet is supposed to "convect" high value outside of my channel.

I use Gauss linear Scheme for gradient and for div. terms. Except for div(phi,k), div(phi,B) and div(phi,nuTilda) where I use Gauss limitedLinear 1;

I hope some one will have an idee to bypass my problem or will tell me if I did something wrong ...
For example, did someone play with convective outlet in LES


Regards,

Cedric
cedric_duprat 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
UDF FOR 3D channel SARA FLUENT 1 April 18, 2019 05:31
Repeated Indicies Dan Main CFD Forum 3 August 23, 2005 00:44
channel simulation Marco FLUENT 1 May 20, 2005 10:18
Open Channel for 2d huong Main CFD Forum 0 February 24, 2005 20:55
Nu value of 2-D Channel Cahtterjee Main CFD Forum 2 September 5, 2002 12:35


All times are GMT -4. The time now is 16:14.