Welcome, Guest
Username: Password: Remember me

TOPIC: Drag force as implicit source terms, S1U and S1V

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43036

  • lhtraymond
  • lhtraymond's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 1
Hi!

I am trying to implement drag as implicit source terms using user_source subroutine.

As there are different information from various sources,I would like to check and confirm the expression and unit of S1U. If I am not mistaken, the expression of S1U is 0.5*rho*Cd*Area*U2 divided by the volume of application, which gives a unit of kg/s2m2. But there are also some previous studies that did not involve rho the density into the equation, leading to a unit of m/s2.

Can you confirm which one is the right expression? Also, from which source file or subroutine can one track how the source terms are applied to the RANS momentum equations? If I am right, S1U should be applied to the right-hand side of the x-dir momentum equation.

The other question is that what are the differences in using explicit and implicit source terms.

Thanks for your help!

Best wishes,
Ray
The administrator has disabled public write access.

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43038

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ray,

Unit of S1U in TELEMAC-3D is the inverse of time [s^-1].

Starting from TELEMAC3D subroutine, you can see that it may be computed by SOURCE subroutine (USER_SOURCE if you have changed something).
Then, it is used in CVDF3D when solving the advection-diffusion of components U and V (horizontal velocity components). In particular in DIFF3D (inside CVDF3D for most of the advection schemes except SUPG).

Using implicit source terms, when possible, is more efficient than explicit source terms as there is a linear equation is solved for the diffusion step (including the source term), more stable.

Anyway, I am curious to read the various source implementations where you saw different units for S1U. Be careful, TELEMAC-2D and TELEMAC-3D behave differently when dealing with source terms.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: lhtraymond

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43039

  • lhtraymond
  • lhtraymond's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 1
Hi Chi-Tuan,

Thanks so much for your reply. It's really helpful.

Out of curiosity, is the unit of explicit source term S0U the same as S1U?

On the other hand, it seems like the implicit source term S1U is then multiplied by U (the x-direction velocity component), which determines the direction. So, should S1U be always negative so that drag force is always in the opposite direction of U when S1U is multiplied by U?

Also, when determining the volume of the object I can use e.g. height*width*length. How different is that volume compared to the summation of discretised mesh node volume using UNSV3D%R in this line of code for instance.
VOLUME_HYDR(I) = VOLUME_HYDR(I) + 1.D0/UNSV3D%R(IPOIN+(J-1)*NPOIN2)
And how can I export this value of VOLUME_HYDR from user_source subroutine for quick checking?

Thanks again.

Best,
Ray
The administrator has disabled public write access.

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43053

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ray,

Hard to answer accurately in holidays without a computer and sources.

Anyway, for unit of S0U, you could have read DIFF3D subroutine and in particular the few lines concerning S0F : dimension of F over time, thus m/s^z for S0U.

I would recommend you to read the following topic where my former colleague Jean-Michel Hervouet explained quite well:
www.opentelemac.org/index.php/kunena/21-...3d-with-source-terms

Where does variable VOLUME_HYDR variable come from? Personal FORTRAN file? What do you mean by « export »?
You can print values in the output file with WRITE(LU,*).
You can write variable in a result file by reading T3D user manual in particular section 11.4 «  Adding new variables ».

Anyway, just with 1 line without knowing loops for every index is quite hard to understand what is exactly implemented. Moreover, it is rather twisted to manipulate the inverse of UNSV3D whereas VOLU3D and VOLU3DPAR exit (see what is computed in MESH_PROP subroutine).

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: lhtraymond

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43062

  • lhtraymond
  • lhtraymond's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 1
Hi Chi-Tuan,

Thanks for replying even though you're in holidays.

I went through the DIFF3D subroutine script and was confused about the difference between S0F and S0U. Are you saying that the unit of S0U is m/s^2 ?

In the meantime, the variable VOLUME_HYDR represents the summation of discretized node volume for the object. The line of code that I've posted is located within a loop over the 2D points and over the specified planes, and VOLUME_HYDRO adds up whenever the 2D points are located within the 2D rectangle that I specified.

I do noticed that the value of VOLUME_HYDRO variable after the summation is larger than the actual volume value (calculated from H*W*L) - quite surprisingly almost two times larger. I wonder if this is the right way to evaluate volume of an object in the domain.

Thanks again,
Ray
The administrator has disabled public write access.

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43082

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ray,

Yes, the unit of S0U is m/s^2.
Variables like tracers, k, epsilon, velocity component can be advected and diffused in the same way and same formalism. That is why TELEMAC-3D sends arguments to generic subroutines CVDF3D, DIFF3D etc with the generic notation F.
If advecting horizontal velocity component along x, you get the explicit source term S0U etc. Unit of U is m/s so unit of S0U is U/time = m/s^2 as unit of S0F is F/time.

I wonder how you control the nodes of your volume in 2D planes if you sum every one from 1 to NPOIN2 and then nodes between specified planes, you should get volume between the specified planes over the whole horizontal extent.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: lhtraymond

Drag force as implicit source terms, S1U and S1V 1 year 3 months ago #43104

  • lhtraymond
  • lhtraymond's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 30
  • Thank you received: 1
Thanks a lot for your reply.

I suspect that unstructured and coarse mesh within the horizontal extent and specified planes are the reasons of the larger computed volume value of the object (as compared to its actual volume).

On the other hand, what would be the signs of the implicit source terms S1U and S1V? I know that the computed S1U will then be multiplied by the velocity U. Since the sign of U and V depends on flow direction (flood or ebb), should S1U and S1V always be negative such that the direction of resultant drag is opposite to that of resultant velocity?

Thanks again.
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.