CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   a problem in CFD-Post (https://www.cfd-online.com/Forums/cfx/152248-problem-cfd-post.html)

divoone1985 April 27, 2015 08:50

a problem in CFD-Post
 
Hello.
The image i attached, show a wave in a tank.
I want to define a chart to show the wave height at a specific x along the time.
to define a point it need to x,y,z. but in this case y is variable.
i can to define chart to show the max or min wave height along the time. but it's not my answer.
i want to show the wave height in x=4.
how i can do it?
http://i61.tinypic.com/nq67p3.jpg

ghorrocks April 27, 2015 18:13

1) Create a line object from the top to bottom of the domain at x=4 (and y=whatever).
2) Graph lengthInt(water.volume fraction)@line versus time
3) Select graph versus time

Note you will get a better graph if you put the integration step in as a monitor point and then you get a point every solver time step. You might have to use an area integral or volume integral instead of a line integral as the solver does not support line objects.

divoone1985 April 30, 2015 00:44

Quote:

Originally Posted by ghorrocks (Post 543994)
1) Create a line object from the top to bottom of the domain at x=4 (and y=whatever).
2) Graph lengthInt(water.volume fraction)@line versus time
3) Select graph versus time

Note you will get a better graph if you put the integration step in as a monitor point and then you get a point every solver time step. You might have to use an area integral or volume integral instead of a line integral as the solver does not support line objects.

Hello and thank you.
but i have some problems:
1- lenghtint don't return waveheight. it's bigger than waveheight.
2- how can i use area integral? is it more accurate than line integral?

ghorrocks April 30, 2015 02:38

1 - It should return the length of the line which is underwater. I will leave it up to you to work out how to get wave height from there.
2 - areaInt(water.vf)@plane will give you the area on that plane which is underwater. I will leave working out what the volume integral will give up to you. For the area integral, divide by the plane width and you will have the average depth on the plane. Whether it is more accurate of not depends on what you are trying to do.

divoone1985 May 6, 2015 04:36

Quote:

Originally Posted by ghorrocks (Post 544409)
1 - It should return the length of the line which is underwater. I will leave it up to you to work out how to get wave height from there.
2 - areaInt(water.vf)@plane will give you the area on that plane which is underwater. I will leave working out what the volume integral will give up to you. For the area integral, divide by the plane width and you will have the average depth on the plane. Whether it is more accurate of not depends on what you are trying to do.

this pic show lineInt(water.vf)@line
is this correct?
i think it's wrong.
where is my mistake?

http://i59.tinypic.com/fnr8rn.png

ghorrocks May 6, 2015 19:40

It looks like your waves are either falling off the end of your line, or are hitting the top or bottom walls of the domain.

Fire up the post processor and have a look.

divoone1985 May 8, 2015 12:57

Quote:

Originally Posted by ghorrocks (Post 545316)
It looks like your waves are either falling off the end of your line, or are hitting the top or bottom walls of the domain.

Fire up the post processor and have a look.

the animation is correct. and there is no top wall and the wave don't hit the bottom wall.
i think there is a problem in the expression lineint

ghorrocks May 9, 2015 06:46

I think it highly unlikely there is a problem with the line integration function. Far more likely that your implementation of it is incorrect.

Can you post an image of what you are modelling, where the line you are using is and some frames from different parts of the wave motion?

divoone1985 May 9, 2015 14:52

Quote:

Originally Posted by ghorrocks (Post 545660)
I think it highly unlikely there is a problem with the line integration function. Far more likely that your implementation of it is incorrect.

Can you post an image of what you are modelling, where the line you are using is and some frames from different parts of the wave motion?

Line Definition
http://i59.tinypic.com/xgcjki.jpg

T=0
http://i60.tinypic.com/34y1c00.jpg

T=2
http://i60.tinypic.com/2s6mvr5.jpg

T=4
http://i57.tinypic.com/21d4ntj.jpg

T=6
http://i59.tinypic.com/288pfsj.jpg

T=7
http://i60.tinypic.com/66b2ty.jpg

T=10
http://i60.tinypic.com/fz7xiq.jpg

T=13
http://i57.tinypic.com/6ns0uq.jpg

ghorrocks May 10, 2015 06:13

You have set the line to use only 10 sampling points. If you make it a cut line you will get the full accuracy. Problem solved.

divoone1985 May 14, 2015 06:29

Quote:

Originally Posted by ghorrocks (Post 545740)
You have set the line to use only 10 sampling points. If you make it a cut line you will get the full accuracy. Problem solved.

Thank you so much.
why I didn't see that?
but what is the different between cut line and 1000 sample line?
they are a little different in results.

ghorrocks May 14, 2015 06:48

Sampling gets the 1000 values along the line by interpolating at each point from the nearby nodes. Cut puts a value on the line whenever the line cuts a control volume and means it does not need to do interpolation.

If you then do operations like lineInt on the line feature you will find cut is more accurate, but sampling is very close when you have lots of points. Sampling can be miles off when you only have a few points.

divoone1985 May 16, 2015 15:08

Quote:

Originally Posted by ghorrocks (Post 546296)
Sampling gets the 1000 values along the line by interpolating at each point from the nearby nodes. Cut puts a value on the line whenever the line cuts a control volume and means it does not need to do interpolation.

If you then do operations like lineInt on the line feature you will find cut is more accurate, but sampling is very close when you have lots of points. Sampling can be miles off when you only have a few points.

Yes, Thank you again.
do you know why it's graph is upper than correct value?
my water depth is 1.66 but the cut line graph at t=0 show 1.71

ghorrocks May 16, 2015 18:46

If you are using a sampling line then it does not have many values to use for the calculation so accuracy will suffer. Use a cut line instead.

divoone1985 May 17, 2015 03:35

Quote:

Originally Posted by ghorrocks (Post 546549)
If you are using a sampling line then it does not have many values to use for the calculation so accuracy will suffer. Use a cut line instead.

I used a cut line.
but it show the water depth 1.71 at t=0


All times are GMT -4. The time now is 14:10.