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

finite area method, depth averaged model

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 19, 2020, 12:38
Default finite area method, depth averaged model
  #1
New Member
 
Join Date: Mar 2020
Posts: 5
Rep Power: 2
Geb1313 is on a distinguished road
Hi foamers,

I am developing (with a colleague) a depth average flow model for viscoplastic debris flow ( fluids with yield stress) based finite area method libraries. The flow model has a two years of the same material; layer 1, a shearing layer with hs and layer 2, plug layer with hp and the total depth of flow is h = hp+hs. One of the physical equation is:

\frac{\partial U_p}{\partial t} + U_p . \nabla U_p + g \nabla h = g_s -\frac{ U_p}{|U_p|} \frac{ \tau_y}{\rho* h_p}

I coded it as:
[/fam::ddt(Up)
+ Up & fac::grad(Up)
+ 1. 0/ rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up)
]
And I got the following compiling error:
"
error: no match for ‘operator+’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::faPatchField, Foam::areaMesh> >’ and ‘Foam::tmp<Foam::faMatrix<Foam::Vector<double> > >’)
+ Up & fac::grad(Up)
~~~~~~~~~~~~~
+ 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up)

error: no match for ‘operator+’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::faPatchField, Foam::areaMesh> >’ and ‘Foam::tmp<Foam::faMatrix<Foam::Vector<double> > >’)
+ Up & fac::grad(Up)
~~~~~~~~~~~~~
+ 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up)

"
Is there any way to write \ U_p . \nabla U_p in openfoam?
Geb1313 is offline   Reply With Quote

Old   May 19, 2020, 13:28
Default
  #2
New Member
 
Join Date: Mar 2020
Posts: 5
Rep Power: 2
Geb1313 is on a distinguished road
I tried to derive an alternative expression from:

\nabla . U_p U_p =U_p .\nabla U_p  +U_p(\nabla .U_p)
Rearranging:
U_p .\nabla U_p = \nabla . U_p U_p - U_p(\nabla .U_p)

Then I coded it as:
[ fam::ddt(Up)
+ fam::div(phip, Up)
- fam::Sp(fac::div(phip), Up)
+ 1. / rho * fam::Sp(tau0 / ((hp+h0)*(mag(Up) + u0)), Up)
==
gs
- gn * fac::grad(h)]
where gn = g & n( normal) and gs = g -gn &n

The compilation went Ok. However a run on a trial case of 1D flume with inlet and outlet gave the following log:

"
Courant Number mean: 0.000277993 max: 0.000277993 velocity max magnitude: 0.0138996
deltaT = 0.000120482
Time = 0.000120482

DILUPBiCG: Solving for Upx, Initial residual = 1, Final residual = 1.53502e-17, No Iterations 1
DILUPBiCG: Solving for Upy, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG: Solving for Upz, Initial residual = 0, Final residual = 0, No Iterations 0

"
It stopped without warning. it couldn't continue to the next equation.

Any help please!

Thanks,

Gebray
Geb1313 is offline   Reply With Quote

Reply

Tags
finite area method

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
interFoam wave propagation and explosion of Courant number and residuals ChiaraViola OpenFOAM Running, Solving & CFD 1 June 26, 2019 05:36
finite area method doesn't work in parallel (foam-extend-4.0) andlog OpenFOAM Bugs 8 December 11, 2017 11:04
The finite element method - “displacement” or “stiffness” method 3Lin7 ANSYS 0 February 15, 2013 18:36
The aspect ratio of the volume elements in Finite Volume Method CharlieTan84 Main CFD Forum 3 August 28, 2012 02:34
finite volume method co2 FLUENT 0 March 1, 2004 12:24


All times are GMT -4. The time now is 08:22.