Category: News
Disable link preview image
When copy-paste a link into a Microsoft Teams Chat window an extra large thumbnail (image preview) is inserted too.
I can close this thumbnail (thumb).
But it is very annoying to close each Web Link Preview Image or Link Thumbnail.
I do work a lot with links and references to other documents, I do not need to Microsoft Team to show a generic thumb towards those sites.
Skype has this feature of: Disable link preview image, where is it in Teams?
When copy-paste a link into a Microsoft Teams Chat window an extra large thumbnail (image preview) is inserted too.I can close this thumbnail (thumb). But it is very annoying to close each Web Link Preview Image or Link Thumbnail. I do work a lot with links and references to other documents, I do not need to Microsoft Team to show a generic thumb towards those sites. Skype has this feature of: Disable link preview image, where is it in Teams? Read More
New to MS Project – Changing start dates not being picked up.
This might be an easy question – I am new to MS Project. In a recent training group when changing the Start Date for a project in Project Information, the new start date is not picked up on the task list and Gantt chart? In a group of four people, my system was the only one ignoring the new start dates.
Our training facilitator had never experienced this before and was unsure how to help….
This might be an easy question – I am new to MS Project. In a recent training group when changing the Start Date for a project in Project Information, the new start date is not picked up on the task list and Gantt chart? In a group of four people, my system was the only one ignoring the new start dates. Our training facilitator had never experienced this before and was unsure how to help…. Read More
What To Do When Stuck In QuickBooks Enterprise 2022 Running Slow Issue?
Help! My QuickBooks Enterprise 2022 is running painfully slow. It’s affecting my productivity and causing frustration. What could be causing this sluggishness, and how can I resolve it quickly?
Help! My QuickBooks Enterprise 2022 is running painfully slow. It’s affecting my productivity and causing frustration. What could be causing this sluggishness, and how can I resolve it quickly? Read More
Teams for VDI – Screenshots Meetings
Any details on when being able to screenshot meetings/shared screens will be available for Teams for VDI / Windows 365? Currently have to use local desktop which is beyond annoying
https://learn.microsoft.com/en-us/azure/virtual-desktop/troubleshoot-teams#calls-and-meetings
Any details on when being able to screenshot meetings/shared screens will be available for Teams for VDI / Windows 365? Currently have to use local desktop which is beyond annoyinghttps://learn.microsoft.com/en-us/azure/virtual-desktop/troubleshoot-teams#calls-and-meetings Read More
How to Fix QuickBooks Desktop has Stopped Working after latest updates?
I recently updated my QuickBooks Desktop software, but now it keeps crashing with a ‘QuickBooks Desktop has Stopped Working’ message. I’m unable to access my financial data or complete any tasks. What could be causing this issue, and how can I resolve it quickly?
I recently updated my QuickBooks Desktop software, but now it keeps crashing with a ‘QuickBooks Desktop has Stopped Working’ message. I’m unable to access my financial data or complete any tasks. What could be causing this issue, and how can I resolve it quickly? Read More
Teams Adds Slash Commands to the Message Compose Box
Teams has added the ability to use slash commands (shortcuts) to the message compose box. Although the feature seems useful, I wonder about its potential usage. The fact is that people are pretty accustomed to how they compose message text and other options are available to add Loop or code blocks or set their online status, so why would they use the slash commands in the message compose box?
https://office365itpros.com/2024/05/16/teams-slash-commands/
Teams has added the ability to use slash commands (shortcuts) to the message compose box. Although the feature seems useful, I wonder about its potential usage. The fact is that people are pretty accustomed to how they compose message text and other options are available to add Loop or code blocks or set their online status, so why would they use the slash commands in the message compose box?
https://office365itpros.com/2024/05/16/teams-slash-commands/ Read More
Lesson Learned #488: A severe error occurred on the current command. Operation cancelled by user.
Today, I worked on a service request that our customer got this error message: “A severe error occurred on the current command. The results, if any, should be discarded.rnOperation cancelled by user.“. This cancellation happens before the CommandTimeout duration is met in the SQL Client application, normally, asynchronous database operations that the CancellationToken setting is reached. Following I would like to share with you my lessons learned.
The customer application was running asynchronous database operations and two primary types of cancellations can occur:
A CommandTimeout cancellation typically indicates that the query is taking longer than expected, possibly due to database performance issues or query complexity. On the other hand, a cancellation triggered by a CancellationToken may be due to application logic deciding to abort the operation, often in response to user actions or to maintain application responsiveness.
Error Handling and Connection Resilience:
Errors during query execution, such as syntax errors or references to non-existent database objects, necessitate immediate attention and are not suitable for retry logic. The application must distinguish these errors from transient faults, where retry logic with exponential backoff can be beneficial. Moreover, connection resilience is paramount, and implementing a retry mechanism for establishing database connections ensures that transient network issues do not disrupt application functionality.
Measuring Query Execution Time:
Gauging the execution time of queries is instrumental in identifying performance bottlenecks and optimizing database interactions. The example code demonstrates using a Stopwatch to measure and log the duration of query execution, providing valuable insights for performance tuning.
Adaptive Timeout Strategy:
The code snippet illustrates an adaptive approach to handling query cancellations due to timeouts. By dynamically adjusting the CommandTimeout and CancellationToken timeout values upon encountering a timeout-related cancellation, the application attempts to afford the query additional time to complete in subsequent retries, where feasible.
Tests and Results:
I conducted a series of tests to understand the behavior under different scenarios and the corresponding exceptions thrown by the .NET application. Here are the findings:
Cancellation Prior to Query Execution:
Scenario: The cancellation occurs before the query gets a chance to execute, potentially due to reasons such as application overload or a preemptive cancellation policy.
Exception Thrown: TaskCanceledException
Internal Error Message: “A task was canceled.”
Explanation: This exception is thrown when the operation is canceled through a CancellationToken, indicating that the asynchronous task was canceled before it could begin executing the SQL command. It reflects the application’s decision to abort the operation, often to maintain responsiveness or manage workload.
Cancellation Due to CommandTimeout:
Scenario: The cancellation is triggered by reaching the CommandTimeout of SqlCommand, indicating that the query’s execution duration exceeded the specified timeout limit.
Exception Thrown: SqlException with an error number of -2
Internal Error Message: “Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.”
Explanation: This exception occurs when the query execution time surpasses the CommandTimeout value, prompting SQL Server to halt the operation. It suggests that the query may be too complex, the server is under heavy load, or there are network latency issues.
Cancellation Before CommandTimeout is Reached:
Scenario: The cancellation happens before the CommandTimeout duration is met, not due to the CommandTimeout setting but possibly due to an explicit cancellation request or an unforeseen severe error during execution.
Exception Thrown: General Exception (or a more specific exception depending on the context)
Internal Error Message: “A severe error occurred on the current command. The results, if any, should be discarded.rnOperation cancelled by user.”
Explanation: This exception indicates an abrupt termination of the command, potentially due to an external cancellation signal or a critical error that necessitates aborting the command. Unlike the TaskCanceledException, this may not always originate from a CancellationToken and can indicate more severe issues with the command or the connection.
using System;
using System.Diagnostics;
using System.Data;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
namespace CancellationToken
{
class Program
{
private static string ConnectionString = “Server=tcp:servername.database.windows.net,1433;User Id=username;Password=pwd!;Initial Catalog=dbname;Persist Security Info=False;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;Pooling=true;Max Pool size=100;Min Pool Size=1;ConnectRetryCount=3;ConnectRetryInterval=10;Application Name=ConnTest”;
private static string Query = “waitfor delay ’00:00:20′”;
static async Task Main(string[] args)
{
SqlConnection connection = await EstablishConnectionWithRetriesAsync(3, 2000);
if (connection == null)
{
Console.WriteLine(“Failed to establish a database connection.”);
return;
}
await ExecuteQueryWithRetriesAsync(connection, 5, 1000, 10000,15);
connection.Close();
}
private static async Task<SqlConnection> EstablishConnectionWithRetriesAsync(int maxRetries, int initialDelay)
{
SqlConnection connection = null;
int retryDelay = initialDelay;
for (int attempt = 1; attempt <= maxRetries; attempt++)
{
try
{
connection = new SqlConnection(ConnectionString);
await connection.OpenAsync();
Console.WriteLine(“Connection established successfully.”);
return connection;
}
catch (SqlException ex)
{
Console.WriteLine($”Failed to establish connection: {ex.Message}. Attempt {attempt} of {maxRetries}.”);
if (attempt == maxRetries)
{
Console.WriteLine(“Maximum number of connection attempts reached. The application will terminate.”);
return null;
}
Console.WriteLine($”Waiting {retryDelay / 1000} seconds before the next connection attempt…”);
await Task.Delay(retryDelay);
retryDelay *= 2;
}
}
return null;
}
private static async Task ExecuteQueryWithRetriesAsync(SqlConnection connection, int maxRetries, int initialDelay, int CancellationTokenTimeout, int CommandSQLTimeout)
{
int retryDelay = initialDelay;
for (int attempt = 1; attempt <= maxRetries; attempt++)
{
using (var cts = new CancellationTokenSource())
{
cts.CancelAfter(CancellationTokenTimeout*attempt); // Set CancellationToken timeout to 10 seconds
try
{
using (SqlCommand command = new SqlCommand(Query, connection))
{
command.CommandTimeout = CommandSQLTimeout*attempt; // Set CommandTimeout to 15 seconds
Stopwatch stopwatch = Stopwatch.StartNew();
await command.ExecuteNonQueryAsync(cts.Token);
stopwatch.Stop();
Console.WriteLine($”Query executed successfully in {stopwatch.ElapsedMilliseconds} milliseconds.”);
return;
}
}
catch (TaskCanceledException)
{
Console.WriteLine($”Query execution was canceled by the CancellationToken. Attempt {attempt} of {maxRetries}.”);
}
catch (SqlException ex) when (ex.Number == -2)
{
Console.WriteLine($”Query execution was canceled due to CommandTimeout. Attempt {attempt} of {maxRetries}.”);
}
catch (SqlException ex) when (ex.Number == 207 || ex.Number == 208 || ex.Number == 2627)
{
Console.WriteLine($”SQL error preventing retries: {ex.Message}”);
return;
}
catch (Exception ex)
{
Console.WriteLine($”An exception occurred: {ex.Message}”);
return;
}
Console.WriteLine($”Waiting {retryDelay / 1000} seconds before the next query attempt…”);
await Task.Delay(retryDelay);
retryDelay *= 2;
}
}
}
}
}
Disclaimer:
The example code provided in this article is intended for educational and informational purposes only. It is strongly recommended to test this code in a controlled and secure environment before implementing it in any production system. The user assumes full responsibility for any risks, damages, or losses incurred by using the code. The author and the blog are not liable for any issues that may arise from the use or misuse of the provided code.
Microsoft Tech Community – Latest Blogs –Read More
my netcdf.open can not open the url I want ;help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
error:
…
READDAP_New: did not work at 98 try: lets try again.
READDAP_New: did not work at 99 try: lets try again.
READDAP_New: did not work at 100 try: lets try again.
READDAP_New: did not work at 101 try: lets try again.
错误使用 readdap (line 45)
READDAP_New: repeated failures after 100 queries
出错 get_ECCO_subgrid (line 45)
lon=readdap(path,’LONGITUDE_T’,[]);
出错 download_ECCO (line 65)
get_ECCO_subgrid(fname,lonmin,lonmax,latmin,latmax);
出错 make_OGCM (line 122)
eval([‘download_’,OGCM,'(Ymin,Ymax,Mmin,Mmax,lonmin,lonmax,latmin,latmax,’,…
readdap (line 45):
if nargin <2
disp([‘not engough input argments’]);
elseif nargin <3 || isempty(query)
disp([‘READDAP_New: Extract : ‘, varname])
while isempty(data)
if ntry>nmax
error([‘READDAP_New: repeated failures after ‘,num2str(nmax),’ queries’])
end
ntry=ntry+1;
try
ncid = netcdf.open ( url,’NOWRITE’ );
varid = netcdf.inqVarID(ncid,varname);
data = netcdf.getVar(ncid,varid,’double’);
netcdf.close (ncid);
catch
data=[];
disp([‘READDAP_New: did not work at ‘,num2str(ntry),’ try: lets try again.’])
end
end
else
…….
the problem:error:
…
READDAP_New: did not work at 98 try: lets try again.
READDAP_New: did not work at 99 try: lets try again.
READDAP_New: did not work at 100 try: lets try again.
READDAP_New: did not work at 101 try: lets try again.
错误使用 readdap (line 45)
READDAP_New: repeated failures after 100 queries
出错 get_ECCO_subgrid (line 45)
lon=readdap(path,’LONGITUDE_T’,[]);
出错 download_ECCO (line 65)
get_ECCO_subgrid(fname,lonmin,lonmax,latmin,latmax);
出错 make_OGCM (line 122)
eval([‘download_’,OGCM,'(Ymin,Ymax,Mmin,Mmax,lonmin,lonmax,latmin,latmax,’,…
readdap (line 45):
if nargin <2
disp([‘not engough input argments’]);
elseif nargin <3 || isempty(query)
disp([‘READDAP_New: Extract : ‘, varname])
while isempty(data)
if ntry>nmax
error([‘READDAP_New: repeated failures after ‘,num2str(nmax),’ queries’])
end
ntry=ntry+1;
try
ncid = netcdf.open ( url,’NOWRITE’ );
varid = netcdf.inqVarID(ncid,varname);
data = netcdf.getVar(ncid,varid,’double’);
netcdf.close (ncid);
catch
data=[];
disp([‘READDAP_New: did not work at ‘,num2str(ntry),’ try: lets try again.’])
end
end
else
…….
the problem: error:
…
READDAP_New: did not work at 98 try: lets try again.
READDAP_New: did not work at 99 try: lets try again.
READDAP_New: did not work at 100 try: lets try again.
READDAP_New: did not work at 101 try: lets try again.
错误使用 readdap (line 45)
READDAP_New: repeated failures after 100 queries
出错 get_ECCO_subgrid (line 45)
lon=readdap(path,’LONGITUDE_T’,[]);
出错 download_ECCO (line 65)
get_ECCO_subgrid(fname,lonmin,lonmax,latmin,latmax);
出错 make_OGCM (line 122)
eval([‘download_’,OGCM,'(Ymin,Ymax,Mmin,Mmax,lonmin,lonmax,latmin,latmax,’,…
readdap (line 45):
if nargin <2
disp([‘not engough input argments’]);
elseif nargin <3 || isempty(query)
disp([‘READDAP_New: Extract : ‘, varname])
while isempty(data)
if ntry>nmax
error([‘READDAP_New: repeated failures after ‘,num2str(nmax),’ queries’])
end
ntry=ntry+1;
try
ncid = netcdf.open ( url,’NOWRITE’ );
varid = netcdf.inqVarID(ncid,varname);
data = netcdf.getVar(ncid,varid,’double’);
netcdf.close (ncid);
catch
data=[];
disp([‘READDAP_New: did not work at ‘,num2str(ntry),’ try: lets try again.’])
end
end
else
…….
the problem: netcdf.open MATLAB Answers — New Questions
Not able to use ‘urROSNode’ or ‘universalrobot’ API due to ROS action server unavailable.
Facing following error message while setting up ROS VM and using ‘universalrobot’ API from ‘Robotics System Toolbox Support Package for Universal Robots UR Series Manipulators’.
Error:
Error using codertarget.manipROSInterface.manipulatorROSInterface/initializeROSActionClient (line 359)
The ROS action server "/pos_joint_traj_controller/follow_joint_trajectory" is currently unavailable.Facing following error message while setting up ROS VM and using ‘universalrobot’ API from ‘Robotics System Toolbox Support Package for Universal Robots UR Series Manipulators’.
Error:
Error using codertarget.manipROSInterface.manipulatorROSInterface/initializeROSActionClient (line 359)
The ROS action server "/pos_joint_traj_controller/follow_joint_trajectory" is currently unavailable. Facing following error message while setting up ROS VM and using ‘universalrobot’ API from ‘Robotics System Toolbox Support Package for Universal Robots UR Series Manipulators’.
Error:
Error using codertarget.manipROSInterface.manipulatorROSInterface/initializeROSActionClient (line 359)
The ROS action server "/pos_joint_traj_controller/follow_joint_trajectory" is currently unavailable. #universalrobot, #urrosnode MATLAB Answers — New Questions
MATLAB third package Simulink for Arduino take too long time ?
MATLAB third package Simulink for Arduino take too long time ? what can i do ?MATLAB third package Simulink for Arduino take too long time ? what can i do ? MATLAB third package Simulink for Arduino take too long time ? what can i do ? matlab support, simulink arduino MATLAB Answers — New Questions
I want to classify linear, parabolic and exponential functions using machine learning.
I need to use machine learning for this project. 10 x and y values of the functions will be given and using these values, it will be understood whether the other functions to be written are linear parabolic or exponential functions. I need help with where to start and where to go after. Not sure what to do.I need to use machine learning for this project. 10 x and y values of the functions will be given and using these values, it will be understood whether the other functions to be written are linear parabolic or exponential functions. I need help with where to start and where to go after. Not sure what to do. I need to use machine learning for this project. 10 x and y values of the functions will be given and using these values, it will be understood whether the other functions to be written are linear parabolic or exponential functions. I need help with where to start and where to go after. Not sure what to do. machine learning MATLAB Answers — New Questions
How to calculate Bootstrap confidence interval
Hi all. I wonder how to calculate bootstrapped confidence interval for following data sent. The conventiona confidence interval is quite large and I wonder if it may make more sense with bootstrapped CIs.
x = [6 10 14 20 26 34 38];
y = [122 107 119 120 105 95 92];
I am using a*exp(-x/b) for fitting which gives a = 127, b = 130. I want to calculated the CIs for bootstrapped sample.Hi all. I wonder how to calculate bootstrapped confidence interval for following data sent. The conventiona confidence interval is quite large and I wonder if it may make more sense with bootstrapped CIs.
x = [6 10 14 20 26 34 38];
y = [122 107 119 120 105 95 92];
I am using a*exp(-x/b) for fitting which gives a = 127, b = 130. I want to calculated the CIs for bootstrapped sample. Hi all. I wonder how to calculate bootstrapped confidence interval for following data sent. The conventiona confidence interval is quite large and I wonder if it may make more sense with bootstrapped CIs.
x = [6 10 14 20 26 34 38];
y = [122 107 119 120 105 95 92];
I am using a*exp(-x/b) for fitting which gives a = 127, b = 130. I want to calculated the CIs for bootstrapped sample. confidence interval, boostrapped MATLAB Answers — New Questions
Temperature profile in a pipe flow with Matlab pdepe solver
I’m currently trying to solve the heat equation for the Ohmic heating of a pipe flow using the MATLAB pdepe solver. The problem is described in the following paper: https://doi.org/10.4236/ojmsi.2021.91002. This paper also contains the solution for the axial bulk temperature profile. Unfortunately, I don’t find the same solution, and I wonder if anyone could help me find the error.
The simplified heat equation for this case becomes:
𝜌𝐶𝑝𝑣𝑧∂𝑇∂𝑧=𝑘𝑟∂∂𝑟(𝑟∂𝑇∂𝑟)+𝑄̂.𝑄̂=𝜎𝐸2 is the heat source due to the Ohmic heating (this is also defined in the paper). 𝑣𝑧=2𝑉𝑎𝑣𝑔(1−(𝑥𝐷/2)2) is the classical solution for the axial velocity of the fluid in the pipe.
Please find the values of the constants in the code below.
The boundary conditions are:
𝑇(𝑧=0,𝑟)=40°𝐶,∂𝑇∂𝑟|𝑧,𝑟=0=0,−𝑘∂𝑇∂𝑟|𝑧,𝑟=𝐷/2=ℎ(𝑇(𝑧,𝑟=𝐷/2)−𝑇∞).
Please find my Matlab code below. Note that in order to be able to use the Matlab pdepe solver, the time argument in the solver corresponds with the axial coordinate 𝑧. Another important remark is that I want to solve it with the option 𝑚=0.
Any help/comments/remarks will be greatly appreciated. Thanks in advance!
%% Main code
m=0;
r=linspace(0,0.025,1000); % m r corresponds with x
z=linspace(0,2.5,1000); % m z corresponds with t
sol=pdepe(m,@pdex1pde,@ic1pde,@bc1pde,r,z);
u=sol(:,:,1); % u=T
% Figure I’m trying to recreate
figure
plot(z,u(:,1))
title(‘Axial bulk temperature distribution’)
xlabel(‘z’)
ylabel(‘T(z,r=0)’)
%% Functions
% Definition of the PDE
function [c,f,s]=pdex1pde(x,t,u,DuDx)
% Parameters
T_0=40; %°C
k=0.6178; % W/m*°C
rho=992.2; % kg/m^3
C_p=4182; % J/kg*°C
m=82.5/3600; % kg/s
R=25*10^(-3); % m
D=50*10^(-3); % m
A=pi*R^2; % m^2
V_gem=m/(rho*A); % kg m
k_0=0.015; % 1/°C^3 /s
elec_cond=0.998*(1+k_0*(u-T_0)); % S/m
v_z=2*V_gem*(1-(x^2/(D/2)^2)); % kg m^3 /s
Volt=2304; % V
L=2.5; % m
Q=elec_cond*(Volt/L)^2*x/k;
c=(rho*C_p*v_z*x/k);
f=x*DuDx;
s=Q;
end
% "Initial" condition
function u0=ic1pde(x)
u0=40;
end
% Boundary conditions
function [pl,ql,pr,qr]= bc1pde(xl,ul,xr,ur,t)
% Parameters
T_amb=20; % °C
T_0=40; % °C
h=10; % W/m^2*°C
k=0.6178; % W/m*°C
pl=0; % left is ul=0
ql=1; % p+qf=0
pr=h*(ur-T_amb);
qr=k/xr;
endI’m currently trying to solve the heat equation for the Ohmic heating of a pipe flow using the MATLAB pdepe solver. The problem is described in the following paper: https://doi.org/10.4236/ojmsi.2021.91002. This paper also contains the solution for the axial bulk temperature profile. Unfortunately, I don’t find the same solution, and I wonder if anyone could help me find the error.
The simplified heat equation for this case becomes:
𝜌𝐶𝑝𝑣𝑧∂𝑇∂𝑧=𝑘𝑟∂∂𝑟(𝑟∂𝑇∂𝑟)+𝑄̂.𝑄̂=𝜎𝐸2 is the heat source due to the Ohmic heating (this is also defined in the paper). 𝑣𝑧=2𝑉𝑎𝑣𝑔(1−(𝑥𝐷/2)2) is the classical solution for the axial velocity of the fluid in the pipe.
Please find the values of the constants in the code below.
The boundary conditions are:
𝑇(𝑧=0,𝑟)=40°𝐶,∂𝑇∂𝑟|𝑧,𝑟=0=0,−𝑘∂𝑇∂𝑟|𝑧,𝑟=𝐷/2=ℎ(𝑇(𝑧,𝑟=𝐷/2)−𝑇∞).
Please find my Matlab code below. Note that in order to be able to use the Matlab pdepe solver, the time argument in the solver corresponds with the axial coordinate 𝑧. Another important remark is that I want to solve it with the option 𝑚=0.
Any help/comments/remarks will be greatly appreciated. Thanks in advance!
%% Main code
m=0;
r=linspace(0,0.025,1000); % m r corresponds with x
z=linspace(0,2.5,1000); % m z corresponds with t
sol=pdepe(m,@pdex1pde,@ic1pde,@bc1pde,r,z);
u=sol(:,:,1); % u=T
% Figure I’m trying to recreate
figure
plot(z,u(:,1))
title(‘Axial bulk temperature distribution’)
xlabel(‘z’)
ylabel(‘T(z,r=0)’)
%% Functions
% Definition of the PDE
function [c,f,s]=pdex1pde(x,t,u,DuDx)
% Parameters
T_0=40; %°C
k=0.6178; % W/m*°C
rho=992.2; % kg/m^3
C_p=4182; % J/kg*°C
m=82.5/3600; % kg/s
R=25*10^(-3); % m
D=50*10^(-3); % m
A=pi*R^2; % m^2
V_gem=m/(rho*A); % kg m
k_0=0.015; % 1/°C^3 /s
elec_cond=0.998*(1+k_0*(u-T_0)); % S/m
v_z=2*V_gem*(1-(x^2/(D/2)^2)); % kg m^3 /s
Volt=2304; % V
L=2.5; % m
Q=elec_cond*(Volt/L)^2*x/k;
c=(rho*C_p*v_z*x/k);
f=x*DuDx;
s=Q;
end
% "Initial" condition
function u0=ic1pde(x)
u0=40;
end
% Boundary conditions
function [pl,ql,pr,qr]= bc1pde(xl,ul,xr,ur,t)
% Parameters
T_amb=20; % °C
T_0=40; % °C
h=10; % W/m^2*°C
k=0.6178; % W/m*°C
pl=0; % left is ul=0
ql=1; % p+qf=0
pr=h*(ur-T_amb);
qr=k/xr;
end I’m currently trying to solve the heat equation for the Ohmic heating of a pipe flow using the MATLAB pdepe solver. The problem is described in the following paper: https://doi.org/10.4236/ojmsi.2021.91002. This paper also contains the solution for the axial bulk temperature profile. Unfortunately, I don’t find the same solution, and I wonder if anyone could help me find the error.
The simplified heat equation for this case becomes:
𝜌𝐶𝑝𝑣𝑧∂𝑇∂𝑧=𝑘𝑟∂∂𝑟(𝑟∂𝑇∂𝑟)+𝑄̂.𝑄̂=𝜎𝐸2 is the heat source due to the Ohmic heating (this is also defined in the paper). 𝑣𝑧=2𝑉𝑎𝑣𝑔(1−(𝑥𝐷/2)2) is the classical solution for the axial velocity of the fluid in the pipe.
Please find the values of the constants in the code below.
The boundary conditions are:
𝑇(𝑧=0,𝑟)=40°𝐶,∂𝑇∂𝑟|𝑧,𝑟=0=0,−𝑘∂𝑇∂𝑟|𝑧,𝑟=𝐷/2=ℎ(𝑇(𝑧,𝑟=𝐷/2)−𝑇∞).
Please find my Matlab code below. Note that in order to be able to use the Matlab pdepe solver, the time argument in the solver corresponds with the axial coordinate 𝑧. Another important remark is that I want to solve it with the option 𝑚=0.
Any help/comments/remarks will be greatly appreciated. Thanks in advance!
%% Main code
m=0;
r=linspace(0,0.025,1000); % m r corresponds with x
z=linspace(0,2.5,1000); % m z corresponds with t
sol=pdepe(m,@pdex1pde,@ic1pde,@bc1pde,r,z);
u=sol(:,:,1); % u=T
% Figure I’m trying to recreate
figure
plot(z,u(:,1))
title(‘Axial bulk temperature distribution’)
xlabel(‘z’)
ylabel(‘T(z,r=0)’)
%% Functions
% Definition of the PDE
function [c,f,s]=pdex1pde(x,t,u,DuDx)
% Parameters
T_0=40; %°C
k=0.6178; % W/m*°C
rho=992.2; % kg/m^3
C_p=4182; % J/kg*°C
m=82.5/3600; % kg/s
R=25*10^(-3); % m
D=50*10^(-3); % m
A=pi*R^2; % m^2
V_gem=m/(rho*A); % kg m
k_0=0.015; % 1/°C^3 /s
elec_cond=0.998*(1+k_0*(u-T_0)); % S/m
v_z=2*V_gem*(1-(x^2/(D/2)^2)); % kg m^3 /s
Volt=2304; % V
L=2.5; % m
Q=elec_cond*(Volt/L)^2*x/k;
c=(rho*C_p*v_z*x/k);
f=x*DuDx;
s=Q;
end
% "Initial" condition
function u0=ic1pde(x)
u0=40;
end
% Boundary conditions
function [pl,ql,pr,qr]= bc1pde(xl,ul,xr,ur,t)
% Parameters
T_amb=20; % °C
T_0=40; % °C
h=10; % W/m^2*°C
k=0.6178; % W/m*°C
pl=0; % left is ul=0
ql=1; % p+qf=0
pr=h*(ur-T_amb);
qr=k/xr;
end fluid meganics, ohmic heating proces, heat transfer, pdepe solver MATLAB Answers — New Questions
How to enable paraent control in windows 11?
Does Windows 11 have the native feature for parent control or I have to download 3rd-party app for doing this?
Does Windows 11 have the native feature for parent control or I have to download 3rd-party app for doing this? Read More
How to fix unrecoverable error in quickbooks desktop
I’m facing an unrecoverable error in QuickBooks Desktop, disrupting my workflow. It’s frustrating not being able to access crucial financial data. How can I troubleshoot this issue effectively?
I’m facing an unrecoverable error in QuickBooks Desktop, disrupting my workflow. It’s frustrating not being able to access crucial financial data. How can I troubleshoot this issue effectively? Read More
Conditional Access Policy – Register security information
Hi,
As response to a security incident we’ve created a conditional access policy to block registration of MFA methodes from other countries based on the User Actions = Register security information.
We noticed that users who are working in other countries using VPN sometimes can’t log in because of this conditional access.
It seems like after a number of logins, over a period of time, there is a registration triggered which causes this conditional access policy to be hit.
Excluding the affected user from this policy solves the issue, and after removing the exclusion the user can keep on working for a period of time without issues.
Is it correct to assume that there is an automatic registering of security information is triggered? What are the conditions for this to happen?
kind Regards,
Ivan
Hi,As response to a security incident we’ve created a conditional access policy to block registration of MFA methodes from other countries based on the User Actions = Register security information.We noticed that users who are working in other countries using VPN sometimes can’t log in because of this conditional access.It seems like after a number of logins, over a period of time, there is a registration triggered which causes this conditional access policy to be hit.Excluding the affected user from this policy solves the issue, and after removing the exclusion the user can keep on working for a period of time without issues.Is it correct to assume that there is an automatic registering of security information is triggered? What are the conditions for this to happen?kind Regards,Ivan Read More
PIM Groups prevent permanent assignment
Hi,
I am designing a PIM implementation and was planning on leveraging PIM groups for most privileged access management scenarios. I created a group and PIM-enabled it and configured the settings to prevent permanent assignment.
However, I find I can still assign permanent members via the normal Entra ID Groups section where you add members to a normal group. Then when I check the PIM section I see a permanent assignment.
Is there a way of preventing this?
Cheers,
Jeremy.
Hi,I am designing a PIM implementation and was planning on leveraging PIM groups for most privileged access management scenarios. I created a group and PIM-enabled it and configured the settings to prevent permanent assignment.However, I find I can still assign permanent members via the normal Entra ID Groups section where you add members to a normal group. Then when I check the PIM section I see a permanent assignment.Is there a way of preventing this?Cheers,Jeremy. Read More
How to Resolve QuickBooks Payroll Error PS032?
I’m encountering QuickBooks Payroll Error PS032 when trying to download updates. How can I fix this issue and update my QuickBooks Payroll successfully?
I’m encountering QuickBooks Payroll Error PS032 when trying to download updates. How can I fix this issue and update my QuickBooks Payroll successfully? Read More
Why Does My QuickBooks Data Conversion Services?
I’m encountering difficulties with QuickBooks data conversion services. How can I efficiently convert my data to QuickBooks format without errors or data loss?
I’m encountering difficulties with QuickBooks data conversion services. How can I efficiently convert my data to QuickBooks format without errors or data loss? Read More
How Do I Fix Unrecoverable Error in QuickBooks Desktop Windows 11?
Encountering an unrecoverable error in QuickBooks Desktop on Windows 11? It’s disrupting my workflow. What could be causing this issue, and how can I fix it to ensure smooth operation of my accounting software?
Encountering an unrecoverable error in QuickBooks Desktop on Windows 11? It’s disrupting my workflow. What could be causing this issue, and how can I fix it to ensure smooth operation of my accounting software? Read More