Hi everyone,
I am trying to
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 |
Hi !
Take a look at the osc
Hi !
Take a look at the oscillatingFixedValueFvPatchField, I think it is exactly what you need. Mathieu |
Hi Feng
As a start, assume
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 |
Hi Mathieu,
Thanks for your
Hi Mathieu,
Thanks for your help, I really appreciate it. oscillatingFixedValueFvPatchField is working fine with me. Kind regards feng |
Hi Niels,
I really apprecia
Hi Niels,
I really appreciate your help. I will try more complex functions with your method. Kind regards feng |
Hi,
I also work on pulsatil
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 |
Sorry,
I scanned the forum
Sorry,
I scanned the forum ... and not the tutorial... ;-) Tobias |
Pulsating Blood Flow in arteries
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 |
Quote:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
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:
|
Quote:
Reading the error, I anticipate it has to do with what boundary type was set.
|
1 Attachment(s)
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 |
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. |
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: |
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. |
1 Attachment(s)
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 |
Quote:
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. |
1 Attachment(s)
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). |
All times are GMT -4. The time now is 13:07. |