## 195 Reputation

13 years, 243 days

Amir

## Correction...

Thank you so much.

I am just curious to see if I change the ICS and BCS, Can I solve the PDEs at all?

Is maple able to solve the system of PDEs like this?

## A new comment on question...

Hi

just had a follow up question that I posted.  Since it seems I cannot post it as a new question so I wasnot sure if anyone can see my comment

Thank you

## A new comment on question...

Hi

just had a follow up question that I posted.  Since it seems I cannot post it as a new question so I wasnot sure if anyone can see my comment

Thank you

## A modification for "d" as a function of ...

Hi

This question would be in line with my previous post and I have uploaded the code here for reference as well.

I am going to change the diffusion coeffcient from constant value to a function that depends on one variable (in my code m_number). I have some difficulty of doing that since m_number is discret and in the code it obtained through integration (int(%, 0..L, numeric) / L). I would be most grateful if you can guide me how I can do this change?

In sum, with my PDE of

PDE:= diff(C(x,t),t)=d*diff(C(x,t),x,x)

I want to put d=cte_0+cte_1*m+cte_2*m^2 where there are three constants and m is the integral of C in the domain at each time (t). Hence, the optimization would be more difficult as it needs to find three constant value (cte_0, cte_1, cte_2) insteady of one (d) in the previous case.

Thank you so much

Here is the code

*********

diffCoeff2.mw

## Thank you...

Thank you So much

## problem with optimization procedure...

thank you so much for optimization procedure.

However, there was a problem of defining one variable which needs to be multiplied by 60 (it was typo in rouben's code). see my reply to rouben:

"

Everything is find with your answer except one mistake in replacing t with t_number. in my code, t=t_number[i] *60 (which is change of minutes to seconds) however, in your code, you didnt use 60. However, when I try to add 60 in your code, the solution would be different and it is equal to 0.0023.

"

So, when I multiply t_number by 60, the optimization code did not give the correct results (it should be 0.0023).

How can I correct that procedure?

## Everything is almost correct...

Thank you Rouben

Everything is find with your answer except one mistake in replacing t with t_number. in my code, t=t_number[i] *60 (which is change of minutes to seconds) however, in your code, you didnt use 60. However, when I try to add 60 in your code, the solution would be different and it is equal to 0.0023.

Many thanks for your help and I appreciate that

Thank you

## That's work...

Dear Preben

As always, I am most grateful for your help.

Thank you

## A revised...

Dear Preben

Actually, phi is the key part of my problem. Instead, I remove some terms including T_Bulk and tanh and now the code is simiplified. But, Still the code does not converge.

I would be most grateful if you help me.

Thank you

## Stupid Mistake...

MAny Thanks Preben. It was a stupid mistake.

Thanks.

## @Preben Alsholm    Thanks Preb...

Thanks Preben,

But, Do you sure that the code get the results for the case

Phiavg:=0.1:
EPSILONE:=0.5:
Nr:=30:
lambda:=0.1;
Ha:=5;
***NBT=0.2***

I run the code but it gaves me errors.

Here, I attach the code for this case.

MaplePrimes14-07-10odesysInt3(1).mw

Thanks

## Wow...

Thanks Preben. It is awesome.

You have always the best solution.

Could you tell me how you find the Guess? Can I have a mechanism that find an appropriate guess to get the results for lower values of NBT?

I get the results for a wide range of parameters, but I still have some problems for other cases.

For example:

Phiavg:=0.1:

EPSILONE:=0.5:
Nr:=30:
lambda:=0.1;
Ha:=5;

NBT=0.2 get error.