|
[Sponsors] |
July 15, 2008, 16:22 |
Hi everyone,
I am trying to
|
#1 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi everyone,
I am trying to modify icoFoam so that it can simulate a pulsating flow in a straight flexible pipe. the flow velocity at the inlet is uniformly distributed but the velocity magnitude changs with time: U = U_0 + U_A*sin(wt) I have noticed the "timeVaryingUniformFixedValueFvPatchField " may be what I want, but it needs to read the data from a data file. Actually I prefer to implement it in the code somthing like: U.boundaryField()[patchI] == U_0 + U_A * sin (wt) and read the "w", "U_0" and "U_A" in a dictionary. So far I haven't got an idea of how to do that, Could anyone give me some hints? Kind regards feng |
|
July 15, 2008, 17:12 |
Hi !
Take a look at the osc
|
#2 |
Member
Mathieu Olivier
Join Date: Mar 2009
Location: Quebec City, Canada
Posts: 77
Rep Power: 17 |
Hi !
Take a look at the oscillatingFixedValueFvPatchField, I think it is exactly what you need. Mathieu |
|
July 15, 2008, 17:28 |
Hi Feng
As a start, assume
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Feng
As a start, assume you know w, U_0 and U_A, then simply do this, which you have already done: U.boundaryField()[patchI] == U_0 + U_A * sin (wt); and add the line: U.correctBoundaryConditions(); It should to the trick. With respect to be reading from a dictionary, look for instance at OpenFOAM/OpenFOAM-1.4.1/applications/solvers/DNSandLES/dnsFoam and search for IOdictionary. Have fun, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 16, 2008, 07:23 |
Hi Mathieu,
Thanks for your
|
#4 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi Mathieu,
Thanks for your help, I really appreciate it. oscillatingFixedValueFvPatchField is working fine with me. Kind regards feng |
|
July 16, 2008, 07:27 |
Hi Niels,
I really apprecia
|
#5 |
Member
feng wang
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hi Niels,
I really appreciate your help. I will try more complex functions with your method. Kind regards feng |
|
August 13, 2008, 05:57 |
Hi,
I also work on pulsatil
|
#6 |
Member
Tobias Holzinger
Join Date: Mar 2009
Location: Munich, Germany
Posts: 46
Rep Power: 17 |
Hi,
I also work on pulsatile flows. I am especially interested in heat transfer effects, that occur in turbulent problems containing flow reversal. So far I tried to simulate my very long (l/D=120) channel with a constant wall temperature, pulsating velocity and oscillatory temperature BC at the inlet. I introduced a special turbulence Model (Wang & Zhang: "Numerical analysis of heat transfer in pulsating turbulent flow in a pipe", Heat and Mass Transfer, 2005) containing wallfunctions. As compressible fluids should be considered, the rhoTurbFoam solver seemed to be the best fitting choice. When run my computations, the temperature cant follow the backflow conditions, and is increased non-physical. Scanning the tutorials, I found some other remarks, that backflow causes instabilities and some suggestions, which are not commented to have been worked out or taken to be valid. Is anybody out there who handled similar problems and has some information, hints etc.??? Thanks Tobias
__________________
Tobias Holzinger Chair of Thermodynamics, TU München |
|
August 13, 2008, 06:08 |
Sorry,
I scanned the forum
|
#7 |
Member
Tobias Holzinger
Join Date: Mar 2009
Location: Munich, Germany
Posts: 46
Rep Power: 17 |
Sorry,
I scanned the forum ... and not the tutorial... ;-) Tobias
__________________
Tobias Holzinger Chair of Thermodynamics, TU München |
|
September 28, 2016, 03:27 |
Pulsating Blood Flow in arteries
|
#8 |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Greetings,
Can anyone please share the code for proper pulsating blood flow ? I have been trying to do that for a long time. Thanks a lot |
|
September 28, 2016, 04:15 |
|
#9 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { walls { type zeroGradient; } cycLeft // p~sin(t) { type groovyBC; patchType cyclic; valueExpression "-2.6780625E-4*(1 + 0.7*sin(2*3.145926*1*time()))"; } cycRight // p=0 { type groovyBC; patchType cyclic; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 -2E-2); boundaryField { walls { type fixedValue; value uniform (0 0 0); } cycLeft { type cyclic; } cycRight { type cyclic; } } // ************************************************************************* // |
||
September 29, 2016, 01:51 |
|
#10 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Quote:
Hello floqution, Thanks for your quick reply. Unfortunately, there is some error with this. When I run simulation, I get the following error: Code:
--> FOAM FATAL ERROR: Attempt to cast type patch to type lduInterface From function refCast<To>(From&) in file /home/fossee/foam/foam-extend-3.2/src/foam/lnInclude/typeInfo.H at line 114. FOAM aborting Aborted (core dumped) |
||
September 29, 2016, 03:43 |
|
#11 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
Reading the error, I anticipate it has to do with what boundary type was set.
|
||
September 29, 2016, 03:51 |
|
#12 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Quote:
Hi floquation, 1) I am using foam-extend-3.2 2) I did set it correctly. Please find the attached case directory 3) I am using fsiFoam solver (https://openfoamwiki.net/index.php/E...re_interaction) Please take a look |
||
September 29, 2016, 05:29 |
|
#13 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
I am not familiar with your solver, and it might be related to the way it works:
What is pointMotionU? In 0/pointMotionU you have set "fixedValue" for the otherwise cyclic boundary. I suspect that this might be the source of the error. |
|
September 29, 2016, 06:39 |
|
#14 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Quote:
This solver is for Fluid Structure Interaction study which I want to implement for blood flow in arteries. I changed the 0/pointMotionU but had to change back the content of the blockMeshDict file(i.e inlet and outlet to type patch, because I was getting a wierd error and blockMesh command was not working). Code:
--> FOAM FATAL ERROR: face 0 area does not match neighbour 1 by 82.5642% -- possible face ordering problem. patch:outlet my area:9.65479e-06 neighbour area:4.0126e-06 matching tolerance:0.001 Mesh face:3 vertices:4((0 0.003414 0.05) (0.002828 0.002828 0.05) (0.003414 0 0.05) (0 0 0.05)) Neighbour face:4 vertices:4((0 0.005 0.05) (0.003536 0.003536 0.05) (0.002828 0.002828 0.05) (0 0.003414 0.05)) Other errors also exist, only the largest is reported. Please rerun with cyclic debug flag set for more information. From function cyclicPolyPatch::calcTransforms() in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 293. |
||
September 29, 2016, 08:29 |
|
#15 | |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quote:
And this error I know: it means that your inlet boundary is not of the same size as your outlet boundary. Therefore, OF cannot match the inlet with the outlet for the cyclic BC. This may have two causes: (1) you made a mistake in your blockMeshDict, or (2) your inlet and outlet were not intended to be of the same size. - If the first is the case, carefully inspect your mesh. - If the second is the case, then perhaps you shouldn't be using cyclic at all? My code above was using cyclic BC, as that was the kind of artery we were interested in. If you do not want to have an "infinite" (=periodic) artery, then you must change my code above to be consistent with your boundary. That basically means still using groovyBC, but changing the patchType from "cyclic" to whatever is appropriate for your case. |
||
October 4, 2016, 09:30 |
|
#16 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Quote:
I have been trying what was suggested by you but I was not able to make it work. Can you please try it once on your system? Please find my attached test case. Thanks a lot |
||
October 5, 2016, 04:19 |
|
#17 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
I'm sorry, but no, I'm not going through the hassle of installing your solver without admin rights.
However, I did look at your blockMesh in ParaView, and it has two problems:
Then, you again have to correct your zero directory, cf. my first post. So, put U and pointMotionU back to cyclic (not groovyBC) and leave pressure on groovyBC. |
|
October 5, 2016, 06:22 |
|
#18 | |
Member
Viraj Belekar
Join Date: Jun 2016
Posts: 68
Rep Power: 10 |
Quote:
Thanks for your quick reply. I tried what you suggested but it didn't work out. Apparently we need to use createPatchDict to set a patchfield as cyclic ( Use of createPatchDict and createPatch ). But when I use it also I get an error, "keyword 'patchInfo' not defined" (PFA). |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What kind of computer is needed to simulate with OpenFoam | anita | OpenFOAM Running, Solving & CFD | 8 | February 21, 2008 12:25 |
UDF for pulsating flow | Bing | FLUENT | 0 | October 7, 2006 12:16 |
pulsating static pressure around zero at pipe flow | David Kim | FLUENT | 0 | May 16, 2006 14:47 |
Pulsating flow in Fluent | Ryan | FLUENT | 0 | December 9, 2005 00:32 |
pulsating flow | Pete | Main CFD Forum | 2 | December 9, 2003 12:39 |