Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Temporal Mean and Residuals per layers from 3d result?

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16071

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Dear Users,

In 2d there are options to extract Surface Temporal Mean and Residuals. With 3d results I can extract layers and look at the velocity results per each layers. Is it possible to extract the Temporal Mean and Residuals from selected layer, as it is not activated I am afraid. Or maybe there is another way to download all velocity values for each node for all time steps as txt file, so I could calculate it myself. Please advise. Thank you.

Kind Regards!

Violet
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16073

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Violet,

Have a look at "Tools->Extract Layer".
The result of this operation can be dealt with as any 2D result.

Hope this helps... Martin
The administrator has disabled public write access.
The following user(s) said Thank You: 716469

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16079

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Hi Martin,

Thank you for your reply. The Temporal Mean and Residual extraction working fine with 2D results. When I move to 3D result file and Extract any layers I wish, then it works fine as well. My problem is to Compute the Temporal Mean and Residual from extracted layer itself. Looks like it works on 2D surface layer only, but it cannot be performed on extracted layer. I can view velocities for each layer, but I cannot calculate the mean or even download all velocity values as text or other files for all time steps, so I could compute it myself. I hope there is a tool for that and I am just not aware of it, as previously I have been using quickplot, but now discovered how many nice tools BlueKenue has. To extract the Temporal Mean from 2D result the file contains UV velocities only. When I extract the layer from 3D result and then view it in 2D, the result file still contains UVW velocities and Temporal Mean formula probably cannot perform as it has to take into account W velocity. However, I can compute Residual and Mean from whole 3D domain but I really need it for each layer separately. Please advise. Thank you in advance.

Kind Regards!

Violet
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16104

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Violet,

On the "Extract Layer From..." dialog make sure you choose "All Frames" as the "Frame Option".

The resulting object is a 2D result. (in spite of it being called "VITESSE UVW (Layer ##)".
When you select this new object the "Tools->Extract Residuals" and other temporal extraction tools will work properly.

Hope this helps... Martin
The administrator has disabled public write access.
The following user(s) said Thank You: 716469

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16106

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Thanks Martin, you were writing to me at the same time as I did. What a coincidence! Thank you, yes I got it accidently, just pressed without thinking:).

Can you give me some hints on how is Residuals calculated. Thank you very much.

Kind Regards!

Violet
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16105

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
HI Martin,

I got it, it is working fine. When I extracted the layer from the 3D result, I had to chose all frames. After that step the Residual and Temporary Mean options became activated for extracted layer. It is great!

Just a quick question. Do you know how Residuals are calculated in BlueKenue. I understand how the Mean(average) flows are computed, but not really Residuals. It should be subtraction, but is it subtraction averaged or something else? Thanks in advance.

Kind Regards!

Vioelta
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16107

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Here is the code:
CSpatialObject *CT32DVector::ExtractResidualMap(int start, int end)
{
// Can we do this??
	if(GetFrameCountTotal() < 2)
		return NULL;

// Store the current file position
	int currentFrameCounter = GetCurrentFrameCounter();

// Go to first frame
	JumpToFrame(1);

// Setup data, initialize all values to 0.0
	double *uMean = new double[m_NodeCount];
	double *vMean = new double[m_NodeCount];
	int i=0;
	for(i=0;i<m_NodeCount;i++)
		uMean[i] = vMean[i] = 0.0;

// Scan all records
	double total = 0.0;
	int frame = 1;
	do{
		if(start <= frame && frame <= end)
		{
			total += 1.0;
			for(i=0;i<m_NodeCount;i++)
			{
				uMean[i] = uMean[i] * (total-1.0)/total + m_u[i]/total;
				vMean[i] = vMean[i] * (total-1.0)/total + m_v[i]/total;
			}
		}
		frame++;

	} while(FrameForward(1) && (frame <= end));

// Create the new object
	CT32DVector *newObject = new CT32DVector;
	newObject->CopyFrom(this);
	newObject->SetFrameCountTotal(1);

	for(i=0;i<m_NodeCount;i++)
	{
		newObject->m_u[i] = uMean[i];
		newObject->m_v[i] = vMean[i];
	}

// Clean up and get out
	delete [] uMean;
	delete [] vMean;
	JumpToFrame(currentFrameCounter);

	return newObject;
}
The administrator has disabled public write access.
The following user(s) said Thank You: 716469

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16108

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Thanks a mil Martin.

Kind Regards!

Violet
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16220

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Hi Martin,

I hope you are doing well. Just a quick question. Do you know if there is an option to re-scale the grid of residual flow extracted from any layer. So far it shows velocity vectors for each node, and since my domain is huge it is hardly to see the direction of the vectors. If I wish to look at velocity vectors then there is an option in Properties/Arrow scale to re-scale the grid, but I could not see anything similar when I look at the residuals per layer. Thanks in advance.

Kind Regards!

Violeta
The administrator has disabled public write access.

Temporal Mean and Residuals per layers from 3d result? 9 years 8 months ago #16241

  • Serrer
  • Serrer's Avatar
  • OFFLINE
  • Moderator
  • Posts: 720
  • Thank you received: 304
Hi Violeta,

The extracted layer is the same as any other 2D result so to scale the arrows you have to change the "Scale" value at the top right of the "Properties:Display" tab.

Hope this helps... Martin
The administrator has disabled public write access.
The following user(s) said Thank You: 716469
  • Page:
  • 1
  • 2
Moderators: Serrer, a.barton

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