Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Sweep Heat source

Please login with a confirmed email address before reporting spam

Hi,

I'm trying to make some datas regarding heat flow in solid materials. I want to get temperature datas by changing the heat source domain by each. (ex: T1 for domain 1, T2 for domain 2, ...) At first, I tried to do it one by one but it took so many time so I'm looking for some other ways that can make this more fast. So in conclusion, I want to sweep the heat source domain and get the temperature data one by one just like parameter sweep.

Can you recommend some way to do this?(My comsol software is version 5.6) Thank u.


1 Reply Last Post Nov 21, 2023, 2:27 a.m. EST
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 12 months ago Nov 21, 2023, 2:27 a.m. EST

This is possible by running an auxiliary sweep using the domain number as sweep parameter (say, para), and an expression like sourceValue*(dom==para) for the heat source which has all domains in the selection.

If the source value differs between the domains, then use an interpolation function, and write sourceValue(para)*(dom==para).

The expression (dom==para) evaluates to 1 when the domain number equals the parameter value, and 0 else.

-------------------
Henrik Sönnerlind
COMSOL
This is possible by running an auxiliary sweep using the domain number as sweep parameter (say, *para*), and an expression like *sourceValue\*(dom==para)* for the heat source which has all domains in the selection. If the source value differs between the domains, then use an interpolation function, and write *sourceValue(para)\*(dom==para)*. The expression *(dom==para)* evaluates to 1 when the domain number equals the parameter value, and 0 else.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.