CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   About interFoam solver (https://www.cfd-online.com/Forums/openfoam-solving/57912-about-interfoam-solver.html)

bjornchr December 9, 2005 05:39

Hi! I am trying to put up a c
 
Hi!
I am trying to put up a complete second order setup for a dambreak problem in interFoam.

Does anybody know a good choice of schemes?

I also wonder what backward means. It says that it is second order, is it better than the Crank Nicholson?

I hope for answer.

Bjorn

eugene December 9, 2005 06:40

Backward is slightly more diss
 
Backward is slightly more dissipative than Crank Nicholson, but on the up side it also tends to be slightly more stable.

bjornchr December 10, 2005 08:30

Thanks a lot Eugene! I am s
 
Thanks a lot Eugene!

I am setting up a dambreak problem and I want to disregard viscousity. Is it as simple as setting mu to zero in the transportproperties file?

Best regards
Bjørn

khleitz April 24, 2007 02:35

Hallo, I want to couple the i
 
Hallo,
I want to couple the interFoam-Solver with the laplacianFoam-Solver in order to calculate the heat conduction in a liquid.
I have changed the damBreak example so that I have a liquid in a pot and the heat source is at the top.
However I can't manage to give the air phase and the liquid phase different transport coefficients DT.
Can anybody help me.
Best regards,
Karl-Heinz

khleitz April 24, 2007 02:42

Hallo, I want to simulate a l
 
Hallo,
I want to simulate a local pressure on a liquid surface. Therefore I have modified the damBreak example so that I have a liquid in a pot.
I want to simulate a local pressure/force on the liquid surface in order to get a little dent.
Can anybody help me?
Best regards,
Karl-Heinz

gschaider April 24, 2007 04:24

Hi KH! About the varying DT
 
Hi KH!

About the varying DT: this is relatively easy. Just replace the scalar DT with a volScalarField. The value of that field is calculated every time before the calculation of the temperature equation:

DT=DTfluid*gamma+DTgas*(1-gamma);

(Or something similar)

khleitz November 7, 2007 03:07

Hallo, can anybody explain m
 
Hallo,
can anybody explain me the pEqn in the interFoam-Solver?
What is rUAf?
Why is there a phi and a phiU? What's the difference?
What does adjustPhi(phi, U, pd) do?
What is the sense of U += rUA*fvc::reconstruct((phi - phiU)/rUAf)?
Best regards,
KH

{
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf = fvc::interpolate(rUA);

U = rUA*UEqn.H();

surfaceScalarField phiU
(
"phiU",
(fvc::interpolate(U) & mesh.Sf()) + fvc::ddtPhiCorr(rUA, rho, U, phi)
);

phi = phiU +
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma)
- ghf*fvc::snGrad(rho)
)*rUAf*mesh.magSf();

adjustPhi(phi, U, pd);

for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pdEqn
(
fvm::laplacian(rUAf, pd) == fvc::div(phi)
);

pdEqn.setReference(pdRefCell, pdRefValue);

if (corr == nCorr-1 && nonOrth == nNonOrthCorr)
{
pdEqn.solve(mesh.solver(pd.name() + "Final"));
}
else
{
pdEqn.solve(mesh.solver(pd.name()));
}

if (nonOrth == nNonOrthCorr)
{
phi -= pdEqn.flux();
}
}

U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
U.correctBoundaryConditions();
}

hjasak November 7, 2007 06:38

I wonder what you will make fr
 
I wonder what you will make from the answers...

Q: What is rUAf?

It is the inverse of momentum matrix diagonal interpolated to the face

Q: Why is there a phi and a phiU? What's the difference?

Because phi is a volume flux and phiU is only its convection-diffusion component. The rest of the correction, which appears on the rhs of the pressure equation is added after the pressure solution to allow face-based treatment of the buoyancy and surface tension terms.

Q: What does adjustPhi(phi, U, pd) do?

A: In cases where the pressure boundary condition is zero gradient all the way around, it adjust the outlet flow to satisfy global continuity.

Q: What is the sense of U += rUA*fvc::reconstruct((phi - phiU)/rUAf)?

That's the rest of the momentum terms, which were on the rhs of the pressure equation. At that point, U only held the convection-diffusion part - see comments above.

Enjoy,

Hrv

khleitz March 8, 2008 07:17

Hallo, can anybody explain me
 
Hallo,
can anybody explain me how the continuity equation is implemented in the interfoam solver?
I guess it is included in the gammaEqn.
Can anybody explain this equation to me, I mean the different terms and their connection to the mass conservation?
Best regards,
Karl-Heinz

hjasak March 8, 2008 07:55

Try a PhD Thesis form Henrik R
 
Try a PhD Thesis form Henrik Rusche - all explained there.

Enjoy,

Hrv

suredross August 18, 2008 10:52

hi all, i have a transport(co
 
hi all,
i have a transport(concentration) equation in my solver and would like to set initial conditions for half my mesh.i have cyclic,fixedwalls and electrodes as my boundaries.there is no inlet or outlet.anyone with ideas??
thanks in advance.
davey

gschaider August 18, 2008 16:06

Hi Davey! "Initial conditio
 
Hi Davey!

"Initial conditions for half of my mesh": I assume you want to set Initial conditions in the WHOLE mesh. Just one value in one half and another value in the other half. There is a utility (setFields) that comes with OpenFOAM that helps you do that. If you're going for more complicated stuff, there is another utility floating around (funkySetFields is the name, I think). But if setFields is sufficient for your purposes, then I recommend that.

Bernhard

suredross August 19, 2008 09:04

Hi Bernhard, yes,its about se
 
Hi Bernhard,
yes,its about setting a different value in each half(concentration)and i have had a look at setfields.unfortunately its not working for me.since it uses boxToCell and i want the value for half the mesh,i am having some problems.any idea of the input method for celltocell??
thanks in advance.

davey

gschaider August 19, 2008 11:19

Just make the box big enough t
 
Just make the box big enough to cover half the mesh and everything should be OK

Bernhard

suredross August 19, 2008 11:29

another thing with the dimensi
 
another thing with the dimensions of the box,its labelled(x,y,z),right??with the coordinates representing a point in the mesh??i am quite hazy about how its done in the tutorial.also,my solver is a modified icofoam,do i get to assign the other physical properties(rho)and nu,again??i need to realise ,with time, the mixing as well.
sorry for my rash thougths-guess am having a long day...
cheers
davey

suredross August 20, 2008 06:09

Hi, figured it out now....run
 
Hi,
figured it out now....running on my case.
thanks

davey

musahossein September 17, 2008 07:01

Is there a way to plot the hor
 
Is there a way to plot the horizontal displacement in the dam break problem using Paraview? Would it be the same as plotting Ux using the Plot over line in the Filters Menu?

Thanks

Musa

asaha September 19, 2008 04:28

(1) Pick up the patch in the R
 
(1) Pick up the patch in the Region Status and select gamma in Vol Field Status.
(2) Define a probeline from Filters menu.
(3) Select Contours gamma=0.5 from the Filters menu.
(4) Integrate Variables from Filters menu. Keep the contour flag visible by making the data visible.
(5) Then Plot Selection over time should give you the desired displacement with time.

I hope this helps. If you come to know a much simpler method please let me also know.

chegdan September 19, 2008 13:59

Can the interFoam solver handl
 
Can the interFoam solver handle cyclic boundaries? I have borrowed some of the code from channelOodles to allow channel flow and extract gradP, but it seems that gamma is not passed through the cyclic boundaries. Does anyone have any insight on what else needs to be changed to pass gamma through the cyclic boundary? Any help is much appreciated.

Dan

musahossein September 19, 2008 16:24

Saha: Thankyou very much for
 
Saha:
Thankyou very much for takning the time to write these instructions. I was tried it, but did not get any results. As a result I have a few questions. They are appended to your instruction as appropriate:

(1) Pick up the patch in the Region Status and select gamma in Vol Field Status.

Musa: I did that. That will leave the "internal mesh" only, correct?

(2) Define a probeline from Filters menu.

Musa: I did not see a probeline option. I saw a probe option in the Filters menu. I decided to put the probe at the intersection of the right side of the wall of water and the bottom of the tank. In other words, I specified the point as (1,0,0) assuming the format is x,y,z.

(3) Select Contours gamma=0.5 from the Filters menu.

Musa: I selected Contours from the Filters menu. However I did not see a option to specify gamma=0.5. Did you mean set the contour line interval at 0.5? Please let me know.

(4) Integrate Variables from Filters menu. Keep the contour flag visible by making the data visible.

Musa: Upon selecting Integrate Variables, I also selected "show data" option in the display tab. However, there is a pull down menu that permits selection of "point data", "cell data" and "field data". Do I need to select any of these or just stick with Point data? I hope you will be able to clarify.

(5) Then Plot Selection over time should give you the desired displacement with time.

Musa: I did, but nothing happened.

Any further suggestion/instructions will be appreciated.

Thanks!


All times are GMT -4. The time now is 07:21.